Convert existing site to network

Don’t try to convert an existing site.

What you’ll want to do is set up a new site with a clean installation of WordPress. Most of the networks I’ve started are subdomains along the lines of http://network.blog.url or http://dashboard.blog.url. The first site you set up will become the dashboard site for the rest of the network … that’s why you want to start with a clean site.

Setup

First, install WordPress normally. You’ll need a fresh database and a fresh download of WordPress 3.0.3.

Next, add define('WP_ALLOW_MULTISITE', true); above the line that says, /* That's all, stop editing! Happy blogging. */ in wp-config.php.

Now, go back to your site and go to Administration » Tools » Network to activate the network installation. You’ll be given some additional information for wp-config.php … copy this code in between where you wrote define('WP_ALLOW_MULTISITE', true); and where it says /* That's all, stop editing! Happy blogging. */. Don’t change anything else in the config file.

Edit your .htaccess file and replace all other WordPress rules with the rules the network installation page gave you.

At this point, you’ll need to log back in to the site, but once you do you’ll have a working multi-site installation.

Migrate Other Sites

Now you’ll want to begin migrating your other sites. Start with the main site and create a new “Site” from within WordPress. You’ll have to copy over a bunch of settings manually, but you can probably get it looking right fairly quickly.

Export your posts and pages from the old site and import them to the new one.

Copy your theme over and any plug-ins you want to use.

If you only have a handful of users, it might be easier to ask them to sign back up once the site’s moved. You can transfer users from the old site to the new site directly through the database … but this involves writing SQL queries to export your old wp_users table, clean out database-specific information (i.e. ID), and write another query to import them into the new database. Doable, but time-consuming.

Once the first site’s migrated, start with the next one.

Domain Mapping

If your multiple sites were originally on multiple domains, you’ll want to install a domain mapping plug-in to make everything work right. I recommend (and use on all my sites) the WordPress MU Domain Mapping plug-in.

Take a deep breath

I know this sounds like a lot and it can be intimidating, but it’s possible. I migrated a 12-blog network with 1400 users last month. Last night I migrated a 5-blog network. Both take about the same amount of time and follow the exact same process I outlined above. Don’t worry, you’ll make your way through it.

If you lost your database connection on your first attempt it’s probably because you overwrote something in wp-config.php by mistake. I’ve had a few times where opening that file in Notepad has stripped all the whitespace from the ends of lines, breaking the file and killing my database connection.

This is the very reason why the very first instruction in any of the WordPress documentation regarding updates or migration is to back up your database and files.

Leave a Comment