Join the community today
Become a Member

Wordpress Wordpress Subdirectory under main wordpress domain

Discussion in 'Blogs & CMS usage' started by Inforit, Sep 10, 2022.

  1. Inforit

    Inforit Premium Member Premium Member

    47
    14
    8
    Jul 30, 2014
    Ratings:
    +18
    Local Time:
    5:27 PM
    nginx/1.7.3
    MariaDB 5.5
    Hi,

    So I have a wordpress under domain.com and now need to add another wordpress install under domain.com/blog2

    I have followed the instructions for how to move wordpress subdirectory
    and have got it all to work except that when I go to a post url, ie domain.com/blog2/1/hello-world/ it calls the main wordpress and sends a not found error as that post is on the subdirectory not the root domain wordpress.


    I think I am missing something else in the nginx conf any tips

    Thanks
     
  2. Inforit

    Inforit Premium Member Premium Member

    47
    14
    8
    Jul 30, 2014
    Ratings:
    +18
    Local Time:
    5:27 PM
    nginx/1.7.3
    MariaDB 5.5

    Solved it, I was missing copying location into the root domain .conf file

    Code:
    location /blog2 {
      include /usr/local/nginx/conf/503include-only.conf;
      try_files $uri $uri/ /blog2/index.php?q=$uri&$args;
     
  3. eva2000

    eva2000 Administrator Staff Member

    49,277
    11,294
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,571
    Local Time:
    2:27 AM
    Nginx 1.21.x
    MariaDB 10.x
    Great to see you figured it out :)