How to Move Your Website to Another Web Host?


In an ideal world, we would never have to worry about switching web hosts – our site would remain happily housed at the current hosting provider’s facility with great load times, affordable costs, and 100% uptime.

Unfortunately, the world is not ideal and this perfect scenario rarely, if ever, exists.

If your current web host is not giving what you need, it might be time to shift to a better one (we will talk about knowing when it’s time to change in the later part of this article). Transferring your site to a new web host doesn’t have to be as tiring as moving to a new house. It can actually be fairly easy if you take the right steps.
Two ways to migrate a website

When moving a website to a different web host, you need to:

  • Purchase and activate a new hosting accounts,
  • Move all website files – including databases and email accounts,
  • Install and configure your application (PHP version, WordPress, etc)  at the new host,
  • Check new site on staging / temporary URL,
  • Troubleshoot if any errors,
  • Point your domain DNS records to the new web host

You can either outsource these tasks to your new hosting company (many will do it for free) or you can transfer your sites manually or using a plugin.

Option #1: Outsource Your Site Move (for Free)

Step 1 – Signup
Step 2 – Migration request
Step 3 – Wait

Picking a web host that offers free migration service is the best option for beginners and busy business owners.

Web hosting is a competitive industry – hosting companies are doing all they can to win new customers. Many hosting companies, including some great ones that I recommend, provide free website migration service to new customers. All you need to do is request a migration after signing up with the new provider and their support team will take care of the heavy-lifting.

In most cases, this is the preferred way so you can save time and focus on other crucial work with your website.

Here’s what you need to do if you are going with this option:

1. Signup with a web host that offers free site migration

Here are come recommended hosting companies that come with free site migration:

  • SiteGround – Excellent support and high quality servers.   
  • Hostinger – Well-known for its competitive pricing and one-stop hosting solution, single website shared plan starts at $0.99/mo.
  • DreamHost – Great web host with over 15 years track record.
  • GreenGeeks – Eco-friendly web host, huge improvement in recent hosting performance.
  • InterServer – Fast and reliable New Jersey-based web host – shared plan starts at $2.50/mo.
  • A2 Hosting – Excellent performance and great price.

2. Request site migration and provide website details

File a migration request with your new web host. Usually all you need to do is to provide login data at your old host – hostname, control panel login, and FTP login, etc; and your new web host will take care of the rest.

3. Site back and relax

Yep, that’s all you need to do.

No database error troubleshooting. No email accounts migration. Easy as a pie.

Option #2: Transfer Your Website Manually

1. Purchase a new web host

You need a new web host in place before you can initiate a host migration.

There are a variety of hosting solutions out there, each with its own configuration and offer. You will need to evaluate and compare which is right for you based on a number of factors, such as cost, required space, and server configuration, to name a few.

Also ideally you should  inform your visitors and/or clients that you are moving to a new web host, along with information about the hours that you are making the switch. It’a good PR practice to do periodically status updates on social media networks to keep your clients informed. Plus, consider asking your users not to visit your website during migration to minimize system load and prevent additional customer service headaches.

2. Move website files and email accounts

For those who are running a static website (site with no database), all you need to do is download everything (.html, .jpg, .mov files) from your existing hosting server and upload them to your new host according to the old folder structure. The move can be done quickly using a FTP / sFTP agent. I recommend using FileZilla if you are looking for one.

Moving a dynamic site (with database) requires a little extra work.

Moving database

For a dynamic site that runs on database (ie. MySQL), you’ll need to export your database from your old web host and import it to your new web host. If you are on cPanel, this step can be done easily using phpMyAdmin.

In case you are using a content management system (i.e. WordPress, Joomla), you will need to install the applications a the new web host before importing the database. Some CMS provides easy transfer functionality (ie. WordPress’ import/ export functions) – you can use that function to transfer your data files directly using the CMS platform.

Moving a WordPress site
Moving WordPress from cPanel to cPanel

For WordPress sites on cPanel (the most common setup) hosting, the fastest way to move your site is to zip everything in your “public_html” or “www” folder, upload the folder to your new web host, and add the following two lines into your WP-config:

define(‘WP_SITEURL’, ‘http://’ . $_SERVER[‘HTTP_HOST’]); define(‘WP_HOME’, WP_SITEURL);

Moving WordPress using common plugins

Alternatively, there are plenty of good migrating plugins for those who are moving WordPress site to a new web host.  I like Duplicator – WordPress Migration Plugin and All-in-One WP Migration for their simplicity. These plugins will help you to move, migrate, or even clone a WordPress site to a new web host with no technical knowledge required.

Moving WordPress using special-built plugins

Some web hosting companies provide their own WordPress migration plugin. For examples WP Engine Automated Migration and SiteGround Migrator – these are special plugin developed for transferring WordPress sites to a designated web host. You should make use of the in-house plugins when switching to those particular companies.

Moving email accounts

Perhaps one of the most difficult parts of switching your web host is transferring your email. Basically you’ll bump into one of these three scenarios:

Scenario #1: Email is currently hosted on a domain registrar (such as GoDaddy)

This email setup is the easiest to move. Login to your domain registrar (where you host your email), change your email hosting A (or @) record to the new web host’s IP address.

Scenario #2: Email accounts are hosted with a third party (such as Microsoft 365)

Ensure that your MX records, along with any other records that your email service provider needs, are updated in your DNS.

Scenario #3: Email accounts are hosted with the old web host

If you are transferring a full account from cPanel to cPanel, you don’t have to transfer your email accounts manually. Alternatively, you can download all your email accounts (and all files within) from cPanel File Manager and upload it to your new web host. The process is simple – here’s a step-by-step guide in case you need help).

In worst case scenario (transferring from a less user-friendly hosting control panel), you will need to re-create all existing email accounts in your new web host manually. The process can be a little tedious – especially if you are running on a lot of email addresses.

3. Final Check & Trouble Shooting

Once you have loaded your files onto the new hosting configuration, double check that everything is working properly on your website

Some hosting companies provide a development staging platform (ie. SiteGround) so that you can easily and fluidly preview your site before taking it live in the new environment, allowing you to remedy any problems behind the scenes.
Repairing site navigation errors and missing links

As you transfer your site’s assets from the previous hosting environment, it is possible for assets, such as graphics to be misplaced or for certain files to be left behind. If this happens, your visitors are likely to experience 404 errors. Keep an eye on the 404 log during and after the switch – this log will alert you of any non-working links or assets that you need to remedy to restore your site to being fully functional.

In most cases, you can make use of .htaccess redirectMatch and redirect to point old file locations to new ones. The following are some sample codes you can make use of.

Define your 404 page

To minimize the damage cause by broken links – where moved.html is the page you wish to show your visitors when there’s a 404 error.

ErrorDocument 404 /moved.html

Transferring a page to a new location

Redirect 301 /previous-page.html

Transferring entire directory to a new location

redirectMatch 301 ^/category/?$

Redirecting dynamic pages to a new location

And, just in case you change your site structure at the new host –

RewriteEngine on
RewriteCond %{QUERY_STRING} ^id=13$
RewriteRule ^/page.php$ [L,R=301]

Troubleshooting database errors

There’s risk where your database could be corrupted during the switch. I will use WordPress as example because that’s what I am most familiar with.

In case that you can still access your WP dashboard, try to first disable all plugins and see if your database pulls up correctly. Then, re-enable them one at a time, checking the home page each time to make sure it is showing correctly.

Things would get a little trickier if you cannot access your dashboard. Try these different simple steps to see if one works:

    Re-upload your database, writing over the new database.
    Check where the corruption error is coming from and try to reupload that file from your old site to your new one.
    Open the file and check to make sure it is pointing to your new server.

Solution #1: WordPress auto database repair

If those steps do not work, you may have to do a bit of coding, but I’m going to talk you through it.

First, open the new site in FTP and go to your wp-config.php file. The file should be in the main folder where you blog resides. Backup this file before you make any edits.

Look for this wording:

/** Absolute path to the WordPress directory. */

Just above that line, add this wording:


Save your changes and leave your FTP program open for now. Open up your favorite web browser. Go to the following address for the rep

Solution #2: phpMyAdmin

If the above methods don’t work, your next step is to head over to your database.

This can be daunting if you aren’t sure exactly how databases work, but the steps are fairly simple. Even if you completely destroy the database, you should be able to just re-download from the old server and upload again. There really is no need to be afraid as long as you have your database backed up.

Access phpMyAdmin from your new web host. Choose your WordPress database. This typically is titled yoursite_wrdp1.

However, this can vary. You will likely see “WP” somewhere in the title, though (see image below). You can also find your database name listed in that wp-config.php file that you had open in the step above. Click on the database name in phpMyAdmin to open it.

4. Pointing domain DNS to your new web host

Next, you’ll need to switch your website’s DNS record (A, AAAA, CNAME, MX) to the new web host’s servers at your registrar.

Your DNS record is a list of “instructions” that specifies where to send the user; moving your DNS record to the new servers ensures that visitors will find your site as intended, rather than receiving an error or misdirect. This is a critical step – make sure you get the right DNS info from your new web host.

Here are the step-by-step instructions on changing your website DNS at Godaddy, Name Cheap, and


If your domain is currently registered at your old web host, consider transferring the domain to a third party so that in case you do ever need to switch hosts again, your domain can come with you more easily and without any potential complications.

5. Verify DNS propagation

Once you have requested to move your DNS record, the switch can take anywhere between a few hours to a full day to take live.

Once the switch goes live, alert your former hosting company as to the cancellation. Monitor your site uptime closely for at least a week or so to ensure everything at the new web host is working properly.

Knowing When It’s Time to Change Your Web Host

Making the switch to a new web host can be a stressful time – which is why many site owners prefer not to switch web host unless it’s necessary. After all – why waste time and energy when everything is working alright?

So when is the right time to start looking for a new host? How do you know that your web host is the root cause of your website problem?

Here are a few hints:

  •     Your site is constantly going down
  •     Your site is too slow
  •     Customer service is not helpful
  •     You nee more space, functionality, or other resources
  •     You are paying too much
  •     You have been hacked, more than once
  •     You have heard about a great service elsewhere

A Good Web Host = Better Sleep at Night

If you don’t feel that level of comfort, or are bothered about negative reports you’ve seen on your web host, it may be time for a change.