How to Move WPMU to a New Domain – The Simplest Guide Ever

This is the quick reference you need when the unfortunate task of migrating a WPMU installation to a new domain falls to you. These instructions should be sufficient for you to move your WPMU install, whether it’s within the same hosting account or you have to put it on a new server. Don’t freak out. We’re going to make this relatively painless for you. There are times when your new host will offer to move all of your data from your old host to the new one but this usually only involves moving the files and databases. There are a couple more steps involved but they won’t be difficult for you because you have this handy guide. Let’s get started!

1. Back everything up before you start this process – files, databases, etc.

You may be in a hurry, but you’re not brain dead, so I know that we can count on you to back up your data and not litter the WordPress forums with problems that could have been averted by making a simple backup.

2. Copy all of the files in your WPMU directory and move them to your new server or new directory via FTP.

If you don’t know how to use FTP, then crack a beer and start googling, my friend. ;)

3. Log in to phpMyAdmin and export your database as a .sql file.

The export tab should be clearly marked. You can find step-by-step help here.

4. Open the exported .sql file in a plain text editor. Perform a search and replace function for the domains.

Search for your old domain and replace it with new one. Save.

5. Create a new mysql database wherever you are hosting the new installation and a new user with all privileges.

(If this step isn’t something you can do in your sleep, then you should probably hire someone to move your site for you.)

6. Import your newly saved .sql file into the database you just created.

7. Open up your wpconfig.php file and input the values for your newly created database/user/password.

define(‘DB_NAME’, ‘wpmu’); // The name of the database
define(‘DB_USER’, ‘wpmu’); // Your MySQL username
define(‘DB_PASSWORD’, ‘hackme123′); // …and password

Save and upload.

Congratulations! You should be operational on your new domain now!

Tips and Hints:

  • Make sure your FTP client copies over the hidden files as well so that you don’t lose your .htaccess file and waste two hours wondering why you’re getting 404 errors.
  • The .sql file can be huge. If your OS crashes while editing it, you may want to shut down most of your applications before embarking on this process, especially resource hogs such as Photoshop and Firefox.
  • If you have wildcard DNS enabled on your old domain for subdomain blogs make sure you’ve got it enabled at your new host if you’re changing hosting environments.
  • If you want any of your inbound links to your old domain to work, you’ll need to do a little bit of redirection magic. Don’t forget about those.
  • For those who dig command line instructions instead of using a GUI, I recommend this post. This can be really helpful if your phpmyadmin times out when you’re doing the import.

Featured Plugin - WordPress Membership Site Plugin

If you're thinking about starting a paid, or just private, membership site then this is truly the plugin you've been looking for. Easy to use, massively configurable and ready to go out of the box!
Find out more

Featured Plugin - WordPress Pop-Up Chat Plugin

No javascript required, no third part chat engine, just fully featured chat right in your own database on your own WP sites - couldn't be easier.
Find out more

Featured Plugin - WordPress Facebook Plugin

Would you like to add Facebook comments, registration, 'Like' buttons and autoposting to your WP site? Well, The Ultimate Facebook plugin has got that all covered!
Find out more

Featured Plugin - WordPress Newsletter Plugin

Now there's no need to pay for a third party service to sign up, manage and send beautiful email newsletters to your subscriber base - this plugin has got the lot.
Find out more

Featured Plugin - WordPress Wiki Plugin

To get a wiki up and running you used to need to install Mediawiki and toil away for days configuring it... not any more! This plugin gives you *all* the functionality you want from a wiki, in WordPress!!!
Find out more

Featured Plugin - WordPress Infinite SEO Plugin

Fully integrated with the SEOMoz API, complete with automatic links, sitemaps and SEO optimization of your WordPress setup - this is the only plugin you need to help you rank your site number 1 on Google - nothing else compares.
Find out more

Featured Plugin - WordPress Q&A Site Plugin

It's now incredibly easy to start your own Q&A site using nothing more than WordPress - The Q&A plugin simply and brilliantly transforms any site, or page, into a perfect support or Q&A environment.
Find out more

Featured Plugin - WordPress Appointments Plugin

Take, set and manage appointments and client bookings without having to leave WordPress. Appointments+ makes it easy.
Find out more

Featured Plugin - WordPress Google Maps Plugin

Simply insert google maps into posts, sidebars and pages - show directions, streetview, provide image overlays and do it all from a simple button and comprehensive widget.
Find out more

Comments (4)

  1. Nice guide, but you can’t just do a search and replace on the SQL output from a DB backup and expect it to work properly, sadly. What will happen is that the serialized PHP arrays that are used in many places in WP, badly, if the domain appears in them and the length changes in any way. Widgets will break, settings will disappear… it’s not pretty.

    Your method is fine for a simple install, with simple blogs, but otherwise flakey.

    Thankfully, and without doing too much of my own trumpet blowing, I hope, I recently documented an alternative way to migrate WPMU and pals over at http://www.interconnectit.com/719/migrating-a-wordpresswpmubuddypress-website/ and we’ve released a search and replace utility, which works at least on the sites we’ve tested it on, over at http://spectacu.la/search-and-replace-for-wordpress-databases/

    I hope you don’t mind those links in there, and that you find them useful.

  2. Thank you for the very informative guide.

    We would like to add www to our existing site http://ancestry24.com that’s been up and running for a while now.

    We are running: WPMU 2.8.6 / Buddypress 1.1.3

    I’ve commented out the www stripping code in wpmu-settings.php, added a 301 redirect in .htaccess to add www. Search and replaced all the instances of http://ancestry24.com to http://www.ancestry24.com and edited wp-config.php to use http://www.ancestry24.com, but all fails…

    Any suggestions would be appreciated.

Participate