I wanted to enable the rest of the Xobni team to create their own personal blogs, giving them the freedom to communicate their technical ideas and discoveries with the world. Unfortunately, while Wordpress supports multiple users, it doesn’t allow each to have distinct themes and posts. The recommended workaround is to install Wordpress multiple times, or use a completely separate fork of called Wordpress MU; both options sound every bit as exciting as this looks.
After some googling, I found a unique solution by Stephen Rider, which allows you to symlink multiple directories to a single wordpress install. I changed a few things, introducing svn updates and a simpler blog replication process. I will detail my changes below:
Check Out the latest Wordpress via Subversion (SVN)
Wordpress is a constantly evolving system - each update brings with it useful new features and bug fixes. You could install Wordpress by downloading it from their site and uploading it to your server - but that means either that you’re forever stuck with the same version that you downloaded or that you must undertake a complicated upgrade procedure. Instead, check out Wordpress via SVN to a directory like /blog/ and SVN will do all the merges for you:
- Navigate to your root directory (or wherever you want to your blog) using ssh
- Run the command:
svn co http://svn.automattic.com/wordpress/trunk/ blog(change ‘blog’ to whatever you want to name your default blog. You’ll need to install subversion first if you don’t have it)
Now, when you want to upgrade to the latest and greatest Wordpress, all you need to do is run ’svn up’ in the root of your blog’s directory. If you’re not familiar with subversion, you really should be using it for your site as well, but I’ll save that for another post.
Download and follow Stephen’s instructions
Stephen does a great job at explaining how to set up wordpress to support multiple blogs in one install, so I won’t steal his thunder - install his fixes by following his instructions, skipping the part where he talks about replicating the mb-config-sample.php.
Now, you could use multiple databases per blog. That’s all well and good, but it means that setting up a new blog will require you to log into mysql and create a new database and set up user permissions each time, not to mention changing the files in the wordpress install as detailed in his instructions. Headache.
I’d much prefer to use one database with different table prefixes for each new blog. For example, for this blog, http://xobni.com/bryan, the table for blog entries is named ‘bryan_posts’ instead of the default ‘wp_posts’. One database, lots of tables. And wordpress will create them for you automagically. Less headache.
To set it up this way, all you have to do is change the new wp-config.php in your blog’s root (as taken from Stephen’s zip file), and comment out line 38 where it says:
$configfile = ‘mb-config-’ . $user . ‘.php’;
That ensures that wordpress always uses the default config file. Now, open /multiblog/mb-config-sample.php and change line 11 where it says:
$table_prefix = ‘wp_’;
To:
$table_prefix = $user. ‘_’;
Then simply rename mb-config-sample.php to mb-config-default.php. This essentially sets up your new multiblog wordpress to prefix each new blog’s tables as ‘blogname_’. When you run the Wordpress setup for each new blog symlink, it will create those new tables for you - no need to touch phpMyAdmin nor replicate any new mb-config-blogname.php files. With how fast we’re hiring, this makes my job even easier.
I hope this was helpful.
Posted on October 8th, 2007 by plusbryan
Filed under: Development

Great idea. I can’t believe I didn’t think of that!
Either method has its advantages. My original has a certain amount of extra flexibility (e.g. WordPress constants), but yours of course is much easier to maintain, especially if you have a _lot_ of blogs going.
That page has a long-overdue rewrite coming — I’ll definitely add this suggestion to the “manual”. Thanks!
As a side note:
I actually do put my blogs in the same database, and just change the prefix. In fact, I’ve been reworking the files a bit so that the user-modified config files really have very little in them beyond the actual variables they have to mess with. KISS and all that.
[…] so that we can better handle future stages of Xobni’s growth. He recently set up Xobni’s team blogs system so each member of the team can share what they are working on and shine in their own way. Adam […]
[…] of the trackbacks to Stephen’s post was by Bryan at Xobni who wanted to find an easy way to add additional blogs as sub-folders of the same domain without […]
Just FYI — this change has been essentially integrated into the new version of the Virtual Multiblog system. Users can now choose to set up separate config files for all, some, or none of the different blogs — which is actually a bit more flexible on your idea (on which I based this functionality).
http://striderweb.com/nerdaphernalia/features/virtual-multiblog/
None…
None…