How to InstallWordPress In A Sub-Directory Using nginx webserver

So I had this issue recently, I had a WordPress site on the main domain, and another WordPress install for some member stuff in a subdirectory/folder inside the main install. The main site worked fine, and the admin panel etc. But when you tried to change the Permalinks, everything got a 404 error.

I noticed that all requests were being routed back to the main domain (without the additional folder) so I guessed it was probably something to do with nginx, most likely this:

Which broke the rewrites inside the folder and sent everything to the main site, to get it working I had to add a couple more location directives for the sub-directory – now all different kinds of Permalink configs work.

This got the site working just fine:

With /subinstall being the name of the sub-folder with the 2nd WordPress install.

Leave a Reply

Your email address will not be published.