Migrating WP site to another URL

I’ve written a very simple script that is built to do exactly what you’re talking about. Here’s the basic process you’ll want to follow.

  1. On the old server, log-in to PHPmyAdmin and export the database.
  2. On the new server, log-in to PHPmyAdmin and create your database. You may need to create a new MySQL user as well, but your web host should be able to assist you. Make a note of the database name, the MySQL username and password as well as the database host (usually localhost).
  3. Using PHPmyAdmin on the new server, import your old database into the new database.
  4. Using FTP, copy all of the files from the old server onto your computer.
  5. Open the wp-config.php file and enter your new database name, username, password and database host.
  6. Go to http://philipdowner.com/2012/01/script-to-make-wordpress-site-migrations-easier/ and download the wp-migrate.php script. Place this in the root of your WordPress site.
  7. Upload the site and all of it’s files (included the wp-migrate.php) file to your new server.
  8. Point your web browser to http://yournewdomainname.com/wp-migrate.php and follow the directions in the script.
  9. The script will update all instances of the old URL in the database for you.

If you need further help, there’s a couple of great threads here on this forum. Also see the Codex article on backing up your database.

Leave a Comment