How to migrate a WordPress installation to another domain in 9 steps

database birds!
photo by cindy47452 with modifications by me.

This issue has been vexing me for months. I had my site (almost) exactly how I wanted it at jessicamullen.com. Then I realized that my 'personal brand' would be much stronger if I was using my jessicamullen.com domain. So I put it on the to-do list to switch over, probably about 4 months ago. This week, I finally did it! The hardest part was figuring out how to do it right–I have thousands of posts in my database & it was causing all sorts of WordPress dashboard import/export problems. Here is what I finally came up with:

  1. Backup EVERYTHING. First, export your xml file from your WordPress dashboard. This step is practically worthless though, if you have a large amount of posts. Next, copy your ENTIRE WordPress installation directory from your FTP. Finally, make a complete backup of your database. I chose to not compress my database backup, but you may have success with a compressed file.
  2. Point your new URL to the directory you will be putting your new files in. First I had to transfer my domain from another hosting company, Yahoo. Once it made it over, I assigned it to my cPanel as an addon domain. During this process I chose a directory for that URL to point to.
  3. Copy your database to a new database. This I did in phpMyAdmin. Find your active database, & simply copy it to a new database with a new name. It should be an option under "operations".
  4. Go back to your cPanel & add a user to the new database. I'm not sure if this is totally necessary, but it's what worked for me.
  5. Download the most recent version of WordPress & update your wp-config.php file with the new credentials - the new database name, user & password. I tried using SimpleScripts through Bluehost to install WordPress but that was a nightmare. Upload the WordPress files to the new folder on your FTP that you designated when you assigned your addon URL.
  6. Upload your theme, plugins, & uploads folder. I still can't figure out how to get the old posts on the new site to point to the new uploads folder. Any ideas on how to remedy this?
  7. Go back into phpMyAdmin & open up your database to start editing entries. All of the entries you need to edit should be in the wp-options table. I had to change the site URL entry from jessicamullenslifestream.com to jessicamullen.com. Then find any other entry that references your old URL and change it to the new one.
  8. Try loading your site! If it doesn't work right away, try logging into your WordPress dashboard. If that works, then you might just have a problem with your theme.
  9. Fix up your widgets, sidebars, & plugins. I had to re-enter my widgets & sidebars (maybe, my memory is hazy here!), but my plugins made it through the process unscathed.

That's all there is to it! I would love to hear if you have any easier methods or suggestions for improvement, since I have to do this again several more times in my near future...