How to transfer a WordPress website to a new web host

If you need to move your WordPress website to a new web host, there are plenty of plugins you can load into your site to do the job for you. But my experience, having tried a number of them, is of repeated time-outs, failed transfers, and restrictive data limits.

Here’s an easy-to-follow, step-by-step guide to doing it manually. It’s not complex and a non-techie can easily follow it. (Though do get in touch if you have issues with it and I’ll fix you up — Adam: ashelton@facttactic.co.nz)

With a bit of practice it’s no more than a five minute job. It beats every other method I’ve used for speed, ease of use and process transparency.

Section 1: Download site contents and database

Follow the instructions in the numbered tabs to easily transfer a WordPress website to a new web host.

  1. Log into the cPanel of your current website.
  2. From the cPanel homepage, scroll to the Files section.
  3. Select File Manager.
  4. Go to the root folder of your website.
    Note: The root folder is the one that will have these three folders in it: wp-admin, wp-content, wp-includes.
    The wp-content folder contains all your website’s content. It is the folder you need to download.
  5. Right-click the wp-content folder and click Compress.
  1. Select ‘Zip Archive’ as the compression type.
  2. Click Compress File(s).
  3. A compression results message appears when compression completed. Close it.
  4. Right-click wp-content.zip and select Download.
  1. Select a location on your computer to download to and click Save.
  1. From the cPanel homepage, scroll to the Databases section.
  2. Select phpMyAdmin. A list of databases displays on the left.
  1. Find and open (click) your website’s database.
    Note: There may be several databases displayed. To ensure you have the correct database:
    a) Click the plus button next to a d/b to expand it and display the tables in it.

b) From the expanded list of tables, click the wp-options table. If the wp-options table has the URL of your website listed in siteurl, you have the correct database.

  1. When you have confirmed the d/b you need, click its name in the left-hand column of phpMyAdmin to open it again.
  2. Underneath the list of tables on the right, select Check all.
  1. At the top of the list of tables, click Export.
  1. Click Go and save the database to your computer.

Section 2: Upload website contents and database to new web host

This step by step guide assumes you have already installed a new instance of WordPress on your new web host and created it using the same URL as your existing website.

Follow tabs 2.1-2.3 to find out how to upload your site’s contents and database to your new web host.

  1. Log into the cPanel of your new website.
  2. From the cPanel homepage, scroll to the Files section.
  3. Select File Manager.
  4. Go to the root folder of your website.
    Note: The root folder is the one that will have these three folders in it: wp-admin, wp-content, wp-includes.
    The wp-content folder is the folder you will replace.
  5. Click Upload (at the top of the screen).
  6. Navigate to your downloaded wp-content zip folder on your computer and upload.
  7. Right-click the existing wp-content on the site and click Delete.
  1. Right-click the uploaded wp-content.zip folder and click Extract.

This will create a new version of the wp-content folder that you have just deleted.

Note: The new version now holds all your website content.

To display the content, upload the database. (How to do this is in the next section, 2.2.)

  1. From the cPanel homepage of your new website, scroll to the Databases section.
  2. Select phpMyAdmin.
    A list of databases displays on the left.
  1. Find and open (click) the database for your website.
    Note: There may be several databases displayed.
    To ensure you have the correct database:
    a) Click the plus button next to a d/b to expand it.
    b) Click the wp-options table. If the wp-options table has the URL of your website listed in siteurl, you have the correct database.
  1. When you have confirmed the d/b you need, click its name in the left hand column of phpMyAdmin to open it again.
  2. Underneath the list of tables on the right, select Check all.
  3. Click Drop (this may be in a drop-down list next to Check all).
  4. Click Yes (to initiate the drop).
  5. Click Import from the menu bar at the top of of the screen.
  6. Click Choose file, navigate to your downloaded sql file and click Open.
  7. Click Go.

The final step in the transfer is to rename the uploaded database to ensure it has the same name as on your previous web host.

To do this:

  1. Return to the cPanel of your old web hosting.
  2. From the cPanel homepage, scroll to the Files section.
  3. Select File Manager.
  4. Go to the root folder of your website.
  5. Right click the wp-config.php file and click View.
  6. Take a note of the entry in $table_prefix.
    It’ll look something like this:
  1. Go to the cPanel of your new web hosting.
  2. From the cPanel homepage, scroll to the Files section.
  3. Select File Manager.
  4. Go to the root folder of your website.
  5. Right click the wp-config.php file and click Edit.
  6. Copy the table prefix into the $table_prefix field.

Section 3: Check transfer was successful

You have now successfully moved your website to its new web hosting. Congratulations!

But how can you check you have moved it successfully? If you enter the web address into a browser it will go back to the old site as that is still the one that has the URL (web address) associated with it.

There is a way to fool your computer into showing you: Edit the hosts file on your computer.

Follow tabs 3.1-3.3 to find out how.

  • On a Windows machine, the hosts file is located at: C:\Windows\System32\drivers\etc

It’s a simple text file, just open it with a text editor and edit as described next in tab 3.2.

Put this code into the Hosts file on your computer: IP-address website-address

  • Get the IP address from your new website’s cpanel. It’s an 11 digit number formatted like this: 122.261.63.149. (It may be in an area with a name like ‘server info’.)
  • Website address: this website’s address, for example, is facttactic.co.nz.

Your entry will look something like this:

Note: you need to be in Administrator mode to save the hosts file. If you are working on your own personal computer, it should bring up a window when you save. Click Yes and it will relaunch in admin mode without losing the data in the file

Once you have saved your edited hosts file, all you need do is enter your website’s address into a browser and hit enter — your computer will be fooled into displaying the site entered in your hosts file.

When you are happy everything has been copied across correctly, delete your hosts file entry and resave it and your computer will go back to displaying the old site (until you are ready to point the web address to the new location).

Scroll to Top