Blog Upgrade Complete: Fun with Multi-site WordPress

February 2011 · 3 minute read

I’ve been running two instances of WordPress on this tiny slicehost machine for over 2 years now. Memory usage has always been a problem. Also, if anyone every actually read this blog I have no doubt this webserver would quickly burst into flames. So a little upgrade was in order:

The results:

It turns out Multi-site means a few different things. WordPress seems optimized do do multiple blogs on the same domain. Everything else is a hack. There seem to be two methods people use for getting full domain name support:

MU Domain Mapping

After configuring your site to be a ‘network’, you can use the MU Domain Mapping plugin to sort of handle full domain names. However, this is sort of half-way there. If you want a blog like ‘rhettg.com’, you have to create rhettg.nullhole.com and your blog, then use the mapping to make rhettg.com work. BUT, all your media and links still point to rhettg.nullhole.com. Meh.

True Multi-Site

I found some instructions here that involve actually doing MySQL queries to add a real site. Not an easy task, but seems to get much closer to what I wanted.

It seems that though under network mode you have ‘Sites’ configuration in admin, but these are actually just ‘blogs’. Internally, WordPress supports multiple ‘sites’ and multiple ‘blogs’ Where a blog is assigned to a single site. A site is essentially your domain name so if you want multiple domain names, the only proper way to to do is to add a real site.

The instructions above successfully got multi-sites working, but didn’t really get my 100% there because my second site was still a second class citizen. I couldn’t get plugins or themes working easily without doing more hacks in MySQL. The key, it seems is to understand conceptually what’s going on here and get the terminology right:

To really get things working properly, you have to make yourself (and other users if you want) Super Admin’s on the second network. I added myself as a Super Admin on the new site by creating a new row in wp_sitemeta. Something like this worked for me:

insert into wp_sitemeta (site_id, meta_key, meta_value) value (2, 'site_admins', 'a:1:{i:0;s:6:"rhettg";}')

I would copy and paste the ‘value’ out of the corresponding value for site #1. I assume this is some sort of PHP serialization format.

Now you can login to the second network and set things up. Kinda awkward, but seems to work now.