WordPress: Moving your site to a new server

WordPress: Moving your site to a new server

Andy Holland

Moving a WordPress install from one server to another can seem a little bit daunting. Let’s say that you’ve fallen out with your current hosting company and you want to move somewhere else. What do you need to know to ensure that your site will stay up and that all of your content is transferred correctly? This handy guide will fill in the banks and hopefully reassure you.

There are three main things to consider when migrating your WordPress install from one hosting provider to another.

  • DNS record
  • WordPress files
  • WordPress database
  1. Prepare your DNS entry

You need to update the DNS to your new hosting server’s IP address. This bit is easy. If you want to move your install across, you should consider changing the Time To Live (TTL) value for your website’s DNS entry the day before you are migrating. This allows the DNS to propagate out across the internet in plenty of time, and means that the lookup will be quicker as your DNS is cached earlier. To do this, you need to go to your DNS control panel. There you can modify the A record and CNAME records to ‘one hour or less’.

  1. Backup your files

Backing up your files ensures that the move doesn’t lose or amend anything as it is transferred. The easiest way to do this is by using a FTP client like Filezilla. This client will be able to download your old site files onto your PC so that you can then replicate them out onto your new server exactly as they were.

Remember to not make any additional changes to your old website once you have downloaded it to your PC, as these won’t be replicated on your new website unless you go through the process again. Hold off until you have uploaded your stuff to the new server.

  1. Backup your database

Your WordPress database is managed by your hosting provider and is usually hosted on a MySQL database. This looks after the configuration and content of your site. Most hosting providers give you database management tools so that you can perform tasks like a transfer. Don’t feel intimidated, you don’t have to be a database administrator to do this.

On the control panel you should see a link to phpMyAdmin, a free tool written in PHP to administrate MySQL across the internet. Username and password can be found in your wpconfig.php file, like below.

// ** MySQL settings – You can get this information from your current web host ** //
/** The name of the database for WordPress */
define(‘DB_NAME’, ‘dbname1234′);

/** MySQL database username */
define(‘DB_USER’, ‘dbuser1234′);

/** MySQL database password */
define(‘DB_PASSWORD’, ‘dbpasswd′);

/** MySQL hostname */
define(‘DB_HOST’, ‘dbhostname’);

 

Once you are in, there will be an option to export. Select your database, save as file and makes sure that compression is set to none. Once you have done this, the file will download to your PC. This shouldn’t take more than a few minutes.

Now you have everything that you need to upload everything onto your new server.

 

If you need help moving your WordPress website, or would like us to handle the hosting contact us for information.

 

Andy Holland

Author Andy Holland

More posts by Andy Holland