• I currently have WordPress installed at the root of my domain, running on nginx.

    Is it possible to install a second instance of WordPress to a subdirectory (e.g. /subdir/)?

    Note: I am not interested in multi-site, as I want to run different plugins on the root and /subdir/ deployments (essentially, to keep some slower plugins from running on the majority of my site).

    Also, going this route, I assume that I’d need to be careful about url conflicts – i.e. I’d need to be sure that I never created a page named /subdir/ on the root site.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Yes, it is definitely possible to install a second instance of WordPress in a subdirectory of your existing installation.

    Regarding URL conflicts, you are correct that you’ll need to be careful to avoid conflicts between the URLs of your root site and the /subdir/ installation. One approach to avoid such conflicts is to use unique slugs for posts and pages in both installations.

    Thread Starter turbodb

    (@turbodb)

    Is it a simple matter of deploying a second instance of the WordPress files to the subdir, and running through the initial setup/config to create a new database, etc? Or, is there a “how-to” somewhere I can walk through? I’ve done a bit of searching, but didn’t turn anything up.

    Seems like I’d at least need to “exclude” /subdir/” from the URL processing of the root deployment so that the root doesn’t try to serve the page and end up with a 404 or some such as a result of trying to work out the “permalink.”

    Thanks!

    Moderator bcworkz

    (@bcworkz)

    Just create the sub-folder and install WP as you normally would (when not using a host’s one-click install method). You can create a new DB for it, or simply specify a different table prefix in wp-config.php and use the same DB.

    You don’t need to do anything about excluding your sub-folder in root .htaccess. If a sub-folder actually exists, the root WP will be bypassed and processing passed to the sub-folder without you needing to do anything special in root.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Installing WordPress to root *and* subdirectory’ is closed to new replies.