Converting Multiple WordPress Blogs into a WordPress 3.0 Multisite, part 1 of 1

I am about to embark upon the task of converting my various, separate WordPress installations into one central WordPress Multisite.  So, same separate blogs with their same separate domains, themes, customizations, plug-ins, and (most importantly) content … into one unified back end.  This was previously possible using WordPress MU, a sort of break-out from the primary WordPress project.  While I played around with MU a bit, I ultimately decided to go with separate installs as too many plug-in’s were incompatible with WordPress MU.

Fortunately, the WordPress 3.0 upgrade adds what MU did, but into the official WordPress project.  Plug-in’s can be re-written to take advantage of global variables, but all plug-in’s and themes are un-effected by the transition as they still operate independently among the various blogs.  This is what I have been waiting for.  Finally, I can have what MU did, but can have it the way I always wanted it – practically seamless and certainly allowing for less work by me (as the admin) on separate back-ends.

Therefore, this post shall document the transition from my multiple WordPress blogs into a WordPress 3.0 Multisite.

First thing’s first – the WordPress Codex:

Migrating Multiple Blogs into WordPress 3.0 Multisite

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 you’ll 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. It’s 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 won’t 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 you’ve 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.

Potential Problems

Limitations of PHP configuration

You may run into trouble with the PHP configuration on my host. There are two potential problems. One is that PHP’s `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-admin/` and `/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 don’t 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 you’ve made the switch.

So the only thing I was murky on here was whether GoDaddy (my webhost) utilized cPanel.  I learned that they do so the CODEX instructions should be strait-forward to follow…

My next post will be from the new WordPress 3.0 Multisite instillation.  I hope.  Always make backups!

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>