3

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.

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.

5 Answers 5

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.

9
  • Yep, I have a network with several existing sites on subdomains, with their own theme, posts, pages, and other content. Commented Jan 23, 2012 at 21:40
  • The reason why the second option may not be the ideal solution is that I need the blogs to use a completely different theme from the subdomain websites. i.e., a.example.com would use one theme, and a.example.com would use a completely different theme. Commented Jan 23, 2012 at 21:43
  • "...with their own theme, posts, pages, and other content." -- Wait: so you're saying that your current subdomain sites already have blogs? If so, can you please clarify your question to better reflect what you have, and what you want? Commented Jan 23, 2012 at 21:44
  • "...I need the blogs to use a completely different theme from the subdomain websites..." -- why would that pose a problem? Each subdomain site defines its own Theme already. Commented Jan 23, 2012 at 21:45
  • I use WordPress as a CMS. The network currently consists of several sites on subdomains - a.ex.co, b.ex.com, etc. - each using a child-theme of my-theme. These sites are not blogs, but use WP posts, pages, etc. to organize content. I now want to add blogs using child-themes of second-theme, accessible at /blog of each of the subdomain sites. Commented Jan 23, 2012 at 21:50
1
+50

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~

2
  • I don't think it's possible to have a subdomain of a subdmain? (blog.a.example.com) WordPress only allows a-z & 0-9 in the subdomain name. Or did you mean blog.example.com/a? Commented Jan 23, 2012 at 21:15
  • I can see where I made it confusing, sorry about that. When you register the new site, you'd want to use a bogus subdomain, like bloga.example.com and then use the domain mapping plugin to map the subdomain of the subdomain. I'll edit my answer to make it less confusing. Commented Jan 23, 2012 at 21:28
1

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)

0

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.

-1

Create your subdomains in your control panel, each with its own directory

Upload WordPress to each directory.

Decide whether you want them to be on the same database or not, probably do, so create MySQL databases for each.

Run the install.

Create blogs and change the permalinks to get the desired link.

http://sumtips.com/2011/01/create-subdomain-install-wordpress.html

3
  • The thing is I already have a WP network install with subdomain sites... all I need is too add more sites to the network that are not on subdomains, but instead at /blog under each of the subdomains. Is that possible? To have both subdomain and subdirectory sites in one WP network? Commented Jan 19, 2012 at 21:53
  • 3
    Upload WordPress to each directory. Uhm … are you serious?
    – fuxia
    Commented Jan 19, 2012 at 22:12
  • Considering he is setting up "separate network" sites, yes. Commented Jan 23, 2012 at 21:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.