WordPress Multisite, NGINX and WordPress Subdirectory Install

I’m attempting to set up WordPress skeleton (https://github.com/markjaquith/WordPress-Skeleton/) in a multisite configuration. WordPress skeleton already places WordPress in a subdirectory (wp by default). I’ve taken the following steps:

  • git clone WordPress-Skeleton
  • Update Submodules and checkout 3.6.1 tag
  • Setup local-config.php to point to my local DB Install WordPress, set
    site settings to example.com (site), example.com/wp (WordPress URL)
  • Configured multisite (subdirectory) and configured NGINX to serve the
    Multisite properly (NGINX config can be found here:
    https://gist.github.com/tmort/6582961)

Once all of this is configured, I can see that the main site (example.com and example.com/wp/wp-admin) both work.

Read More

I then add a new site to the network. Upon navigating to the site url (example.com/test-network-site) the front-end is broken (style.css, for example, cannot be found at the URL http://example.com/wp/test-network-site/wp-content/themes/twentythirteen/style.css?ver=2013-07-18). When navigating to the wp-admin, I’m in a redirect loop.

My end goal is to be able to use WordPress Skeleton as a base for the sites I deploy and have the multisite configuration work as it does normally (where example.com is the network main site, example.com/test-network-site is a site within the network, and example.com/test-network-site/wp-admin works as it should). At this point my main question may be is this even possible?

I have a good feeling that the NGINX configuration is the main issue as (for fun) I created the exact same environment locally and fired up MAMP. Under MAMP, this configuration works fine.

Unsure of how to move forward. Any insight would be greatly appreciated!

Related posts

1 comment

  1. You might check in General Settings:

    • Home URL should be http://example.com
    • Site URL should be http://example.com/wp

    When you open http://example.com, what URL does it show for …/twentythirteen/style.css?

    Do you see the “broken” URL

    http://example.com/wp/test-network-site/wp-content/themes/twentythirteen/style.css

    in the source? If so, it suggests WordPress might be using a wrong path (not necessarily nginx).

    I think that should be

    http://example.com/test-network-site/wp/wp-content/themes/twentythirteen/style.css

    You might check if that URL works at all.

Comments are closed.