Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

We have an existing WP3 site and would like to make it multiuser instead of the multiple installs we have now. I add the "WP_ALLOW_MULTISITE" CODE and relaunch - start the Network and then add the multisite code to wp-config and the .htaccess file. As soon as I do that and log out - it no longer finds a database connection. I noticed on previous attempts that a network database has wp_blogs table, and several other tables, where a standard install doesn't have that- I've checked all our other sites/databases. Is there more to do? We have our main site with another independent install within it that handles press releases. I'm looking to consolidate to one and need the separate permalink structure(the second install puts the posts at /resources/media_center/pr

share|improve this question
    
Migrating Multiple Blogs into WordPress 3.0 Multisite <codex.wordpress.org/…;? –  user25806 Jan 9 '13 at 19:47

2 Answers 2

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.

share|improve this answer
    
Turning on multisite on an existing site is kind of the whole point that multisite was added to core WordPress and is no longer a separate install. Really, if you do your homework and now any of the gotchas, enabling it on a site of any size or age is just as easy (and sometimes less work) than making a whole brand new site. I covered a lot of it in here: wpebooks.com/2010/09/how-to-enable-multisite-in-wordpress –  andrea_r Dec 19 '10 at 22:32
    
Yes, it can be easy to enable it on any existing site, but that's if you want that existing site to become the network dashboard - when single signon is enabled, everyone has an account on the first site. So if your existing site is meant to be the parent, by all means convert the existing site. If there is no specific "parent" site, though (i.e. all the sites are on an equal playing field) it's better to create a new, empty site to serve as the network dashboard and import your existing sites to the new network. –  EAMann Dec 21 '10 at 14:55

Here are a couple of extra links if you want to import settings stored only in the database and not saved in WordPress's export files

share|improve this answer
    
...no links there :( –  onetrickpony Dec 19 '10 at 22:50

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.