Rough Guide to upgrading WordPress MU 2.9.x to WordPress 3.0 Multi-Site

** Update** Skip to the comments. One Assumption on my part led to a lot more work than is needed. This guide does work, but as Ron (@wpmuguru) pointed out, I went around the block to just go next door. Even smart people are dumb sometimes ;)

The WordPress 3.0 betas are kicking around and for projects still in development, upgrading now will save you the trouble later after the site is in production. Upgrading Single Site WordPress installs to 3.0.x is as easy as ever, but now that WordPress µ has been rolled into the main WordPress code base it takes a bit more work to “cross-grade” to the new WordPress 3.0 Multi-Site features.

This is a rough guide to upgrading WordPress MU 2.9.x to WordPress 3.0 Multi-Site. That means that I’m largely pulling this from recent memory and may skip a step or state something inaccurately. Feel free to heckle correct me in the comments.

  1. Get a copy of WordPress 3.0 via Subversion.
  2. When I tried to reuse my MU-style wp-config.php (even after adding WP_ALLOW_MULTISITE) I got a number of strange errors, so I recommend starting a fresh wp-config.php based on the wp-config-sample.php file that comes with WP 3.0
  3. Add this to your wp-config.php file to enable Multi-Site: define('WP_ALLOW_MULTISITE', true);
  4. Copy over your DB Settings and the security SALT constant definitions. Double check these, I had to add another one called NONCE_SALT that I wasn’t in my original wp-config file. Don’t forget to upload your changes.
  5. Remove the wp-content/blogs.php file. You’ll be prompted later if you don’t.
  6. Now this is where it got tricky. In order to get WordPress to enable Multi-Site you have to kick off the process from WP-Admin > Tools > Network, but our table structure is all wrong since we were on WP-MU. Export your DB to a SQL file (Structure+Data), and find all of your wp_1_* tables (assuming your table prefix is wp_).
  7. Run a search and replace operation and change wp_1_ to wp_ in your sql file. Remove everything else.
  8. Then import the renamed tables and data back into your DB. You won’t have to remove or do anything to the original tables.
  9. Now you need to do a little DB hacking. Find your user by ID in the wp_usermeta table, and find the entries that have an option name that starts with wp_1_*.
  10. Add new keys using wp_* as the option names, and copy the values from their wp_1_* counterparts. This will ensure you have privileges on your own blog.
  11. Log in to WP-Admin. You should be greeted with the familiar Database Upgrade Required dialog. You may or may not also be prompted to repair your database. If you are, run the repair operation and try the Upgrade again.
  12. Once logged in, go to Tools > Network and activate your Multi-Site features. It should recognize that you have a network already, and prompt you to update your wp-config.php with additional constant definitions and to replace the WordPress rewrite rules in your .htaccess file.

After all that, you should be good to go. Remember that your mileage may vary and make good backups of everything before proceeding. If you know of an easier way to do this, let me know in the comments.

10 Responses to “Rough Guide to upgrading WordPress MU 2.9.x to WordPress 3.0 Multi-Site”


Leave a Reply