Moving to a new WordPress host

The decision to move your WordPress site from one host to another could be due to any number of reasons. You may be looking to upgrade, maybe you want to go with a less expensive host or maybe you are unhappy with the service or security of your current hosting provider (see our recommended WordPress hosting).

Whatever the reason, you need a plan in order to make sure everything goes smoothly because not moving your site the right way could cause you to lose content, you may need to reinstall your plugins or your blog may look broken to visitors.

Luckily, moving your files from one site to another isn’t overly complicated. However it is one of those things that needs to be done correctly in order to insure that your blog looks the same on the new host’s severs as it did before you moved it.

Backing up the database files

Before making any big changes to your WordPress site you should always back up your files and database. In this instance, your backup is not only going to protect you in the event something goes wrong, but it is going to be what populates your site on your new server.

For simple backups you would likely use a WordPress plugin or the Export tool, but for moving everything we are going to use phpMyAdmin. You may be able to access this from your web host’s management panel, but if not you will need to check with your hosting provider to see how to access this. Once you are in, select Databases and then choose your WordPress database (if you have several databases, if you only have the one WordPress site this will be the only database listed).

With this selected you will be taken to a screen that will show you all of the tables in your WordPress database. On the top, there will be a tab called Export, click on this without selecting any of the options.

At the bottom of the screen you will see…

mysql-export

Make sure that Save as file is checked and then click Go. This will bring up the save window. The file will be saved to the location of your choosing as an uncompressed SQL file. You can compress this file but to keep things easier, leave it uncompressed.

Set up your new WordPress site

On your hos, install WordPress on your new host’s server. This can be done with the management panel or by uploading WordPress and running the install script.

When the application has been successfully installed, login to phpMyAdmin on your new host and locate the WordPress database that was just setup during the installation process. If you are having trouble locating this, look in your wp-config.php file. This will tell you the name of the database under the MySQL settings.

Now you will want to transfer everything from your old database, in your backup file, to the newly created one. In phpMyAdmin you will need to first empty the new database of its content by selecting the Check All option to highlight all the tables and then selecting Drop. When asked if you are sure that you want to drop all of these tables, select Yes.

When your new database has been emptied, click on the Import tab at the top of the screen. Browse to the uncompressed SQL file that you saved earlier and choose it. Now select Go and your tables will be imported, filling your database with data from your old WordPress site.

The finishing touches

Once you have imported all of the data from your old database you need to make sure that your table prefixes are correct. To do this, open the wp-config.php file and look for  $table_prefix =. Make sure that the prefix listed, usually wp_ by default, is the same one as the prefix for the tables you just imported. If it is different, change it to the one on your imported tables and save the changes.

This should do it. Your files should now be moved to your new server and your blog should be up and running. Once you have tested everything and your site is working, go ahead and take care of any DNS settings and maintenance that you need to make the move complete.

Charles has been building and promoting websites and services in New Zealand, Australia, the United States and China for nearly 20 years.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.