WordPress 3.0 includes new multisite features, meaning that it can run many blogs, even with their own separate domains, on one WordPress installation. This tutorial explains how to migrate multiple WordPress installations into one new WordPress 3.0 multisite. You can migrate sites that are using their own domain, as well as sites using a subdomain on your main domain.
This tutorial assumes that you are hosting WordPress on a site using cPanel. If you are using something else to configure your server, you will have to adapt these instructions.
Steps to Follow
0. Backup your sites
Generate a full site backup in cPanel. It might also help to copy all the files on the server via FTP, so that you can easily access the files for plugins and themes, which youll need in a later step.
1. Export from your existing WordPress installations
In each of your existing WordPress installations, go Tools > Export in WordPress. Download the WXR files that contains all your posts and pages for each site. See the instructions on the Tools Export SubPanel.
Make sure that your export file actually has all the posts and pages. You can verify this by looking at the last entry of the exported file using a text editor. The last entry should be the most recent post. Some plugins can conflict with the export process, generating an empty file, or a partially complete file. To be on the safe side, you should probably disable all plugins before doing the exports. Its also a good idea to first delete all quarantined spam comments as these will also be exported making the file unnecessarily large.
2. Install WordPress 3.0
Install WordPress 3.0 to the root of your public_html directory. It has to be at the root or the multi-site feature wont work. Follow the instructions for Installing WordPress in the Codex.
3. Create a wildcard subdomain
Create a wildcard subdomain. This should be as easy as going into cPanel and creating a subdomain named *.
4. Activate multi-site
Activate multi-site in your WordPress 3.0 install. This involves editing wp-config.php a couple of times. You need to use the subdomain, not the subdirectory, option. See the instructions in the codex on how to Create A Network.
5. Create a test blog
Create a test blog in the WordPress 3.0 Superadmin > Sites panel. It should show up as subdomain.yourdomain.com. Test the blog to make sure everything is working correctly at this point.
6. Install the WordPress MU Domain Mapping plugin
Install the WordPress MU Domain Mapping plugin. Folllow the installation and configuration instructions in the readme.
7. Create blogs for each site you want to import
Create blogs for each of the sites you want to host at separate domains. For example, one importedblogdotorg.mydomain.com.
8. Import WXR files for each blog
Go to the backend of each blog, and import the exported WXR file for each blog. Map the authors to the proper users, or create new ones. Be sure to check the box that will pull in photos and other attachments. See the instructions on Tools Import SubPanel.
9. Copy theme and plugin files
Copy the theme and plugin files from your old WP installs to the directories in the new wp-content. You can activate themes for the network, or you can go to Superadmin > Sites, then click edit on the site you want, and enable a given theme for just that site.
10. Edit WordPress configuration settings for each site.
Edit the configuration settings, widget, etc. for each site. By the end of this step, each site should look exactly as it did before, only with the URL subdomain.yourdomain.com rather than its correct, final URL.
11. Park domains at your main site
Park each of your domain names at your main site. You can do this easily in cPanel. If youve been using the domains as add-on domains, then you need to delete the add-on domains first, then create the parked domains.
The domains that you wish to park must be pointed to the nameservers of your hosting provider.
12. Map the domains
Go to Superadmin > domains, and map the sites to the new domain. It should be as easy as addig site id 1 maps to mywebsite1.com.
Limitations of PHP configuration
You may run into trouble with the PHP configuration on my host. There are two potential problems. One is that PHPs
max_upload_size will be too small for the WXR file. The other problem is that the PHP memory limit might be too small for importing all the posts. There are a couple ways to solve it. One is to ask your hosting provider to up the limits, even temporarily. The other is to put a
php.ini file in your
/wp-includes directories that ups the limits for you. (
php.ini files are not recursive, so it has to be in those directories.) Something like a 10 MB upload limit and a 128 MB memory limit should work, but check with your hosting provider first so that you dont violate the terms of your agreement.
Search the WordPress support forums for help with PHP configuration problems.
Converting add-on domains to parked domains
Deleting add-on domains in cPanel and replacing them with parked domains will also delete any domain forwarders and e-mail forwarders associated with those domains. Be aware of this, so that you can restore those forwarders once youve made the switch.