Sub-directory blog on a sub-domain WordPress network site

I have a WordPress Network install with the individual sites installed on subdomains.

  • example.com
  • a.example.com
  • b.example.com

I would now like to launch a blog on each of the sites. It’d like the blog to be situated in a /blog sub-directory of each of the subdomains, but as the blogs would be completely separate from the website and use it a different theme, I think it makes sense to have them as separate sites in the network.

Read More

In other words, what I’d like to have is:

  • example.com
    • example.com/blog
  • a.example.com
    • a.example.com/blog
  • b.example.com
    • b.example.com/blog

Each of the above being a separate WordPress Network site, with different themes, admin panels, etc.

Is there any way to accomplish something like this? Thanks!

P.S.: The site runs on nginx.

Related posts

Leave a Reply

5 comments

  1. You could create a network-of-networks, using the WP Multi Network Plugin. The primary network would be a subdomain network, and the subsidiary networks would be subdirectory networks.

    Alternately, you could simply set up a subdomain network, and then use a static front page in each of the network sites, with the blog posts index set to be displayed on a static page named “Blog”. Then, you could modify your Theme, using the home.php template file, to customize the appearance/display of the blog posts index (or, use page.php to customize the appearance/display of static Pages, which might be easier).

    But, this somewhat confuses me:

    I have a WordPress Network install with the individual sites installed on subdomains. …I would now like to launch a blog on each of the sites. It’d like the blog to be situated in a /blog sub-directory of each of the subdomains…

    So, you’re already running WordPress on your subdomain sites, but want to run WordPress on a separate subdirectory beneath each of those subdomains?

    On your current WordPress subdomain sites, do you actually have content? If so, are you using static pages to generate that content? If so, then I would definitely go with the second option.

  2. While I actually wouldn’t recommend it, this is possible using the apache module mod_proxy. You would setup an additional site in WordPress for each new blog, at a bunk subdomain like bloga.example.com. You’d then use mod_proxy to include this site in a.example.com/blog/. I’ve done it before and while it works, I’ll add that it’s janky (every now and again, something in wp-admin would not work as expected, but it was never predictable). So there’s the answer to your question. That said…

    (1) If it’s not critical to have different wp-admins, I’d recommend using your permalinks to set posts to start with /blog/ and use a technique like those mentioned here to use a different theme for blog posts.

    (2) If it is crucial to have a separate wp-admin, I’d recommend going with a blog subdomain on each site instead of a subdirectory. This is the ideal setup; since it behaves like a different site, that’s what it should be anyway. You can again accomplish this as with using mod_proxy by setting up the new blog using a bunk subdomain like bloga.example.com and then using the Domain Mapping plugin to map blog.a.example.com to it. The site will then be accessible at blog.a.example.com.

    Cheers~

  3. I’m not sure if I understand your question, but I’d go the easy way: just add a custom taxonomy for blog posts and simple use an archive of that taxonomy. For example, you have a.example.com/blog . So /blog would be a page with a custom template which lists all the posts under the (say) “blogpost_tax” taxonomy. Obviously, you may style that page template any way you want, like ## Header ## / # content # / # sidebar # / # footer #

    So in the content part you can simply query posts with the custom taxonomy (or even a blog category) and add the comment template or whatever

    Hope you understand what I mean since English is not my first language (not even my second or 3rd, lol)

  4. I’ve finally solved it by installing a separate WordPress instance in the /blog folder. Both the root and the /blog are Network subdomain installs. Surprisingly enough this works without any conflicts and I didn’t even need the Multi Network plugin.