Simple: Multiple sites with one WP
-
I thought of this shortly before going to sleep last night (literally flipped on the light and scribbled it down), dunno if it’s already been thought of (post a link if it has!), but it seemed like a good idea:
To implement multiple sites/blogs in wordpress, perhaps we could use the already existing category framework?
This is what I’m thinking: For each site’s respective index.php, set it up so that only “category” X is shown, where everything inside X is the content designated for that site.
Here’s an example:
Candles.com has the “Candles” and “Candle Information” categories shown on its page, while Jackets.org has everything inside the “Jackets” category, which includes the subcategories “Denim”, “Cotton”, and “Hoodie”. These two sites run completely independant of each other, but they both get their content from the same WP install.
It’s worth noting that this concept can already be used on your own WordPress site, without any sort of manual modification to the code. However, you need to use this plugin to hide/show posts according to their category, as this functionality has not yet been introduced into WP’s template tag set (as of 1.2). There are likely several sites out there using this plugin in order to have some pages on their site show only the posts made for a certain category, such as having an “About me” page. However, this same concept could be used to create mini-blogs on one’s site, or even completely separate sites, using just one WP install (but multiple index.php’s, one for each site’s respective layout). I’ve done something along these lines for dividing up the content on my site, beoba.net, and there are probably dozens of other sites who have done similar things to theirs.
However, this concept does not completely encompass the functionality that an administrator would want to have with multiple sites. Using the example given earlier, what if I had multiple users posting to WP, and I wanted to restrict them from posting to Candles.com, while still giving them access to Jackets.org? To do this, we need a way to restrict the user’s ability to post according to category. I’ve found this hack that should do just that, though I haven’t tried it myself just yet.
So, with the combination of the “Show Categories” plugin and the “Category Restrictions” hack, we have an effective means of maintaining multiple sites using the same WP install, in a way that is both straightforward and that also wouldn’t be too difficult to implement into a future release of WP (hint).
This has probably been thought of (and implemented) before, but a moderate amount of searching didn’t turn anything up, so here you go. This is more of a general overview of the concepts involved, if you want something more technical, say along the lines of a step-by-step, feel free to request and I’ll try to throw something together (once I’ve screwed around with the aforementioned hack). I’m hoping some of these functionalities can be added into a future release (especially a template tag showing/hiding posts according to category).
Thanks for reading!
- The topic ‘Simple: Multiple sites with one WP’ is closed to new replies.