Home / Articles / Web Hosting Guides / How to Migrate Your Website to A New Web Host

How to Migrate Your Website to A New Web Host

Migrating your website to a new web host doesn’t have to be as tiring as moving to a new house. In fact, it can actually be fairly easy if you take the right steps. In this article, we will discuss the two ways to transfer a website to a new hosting server.

Need Web Host Suggestions? Best Web Host / Cheap Hosting / VPS Hosting / Cloud Hosting

Two Ways to Transfer a Website

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

  1. Purchase and activate a new web hosting account
  2. Move all web files to the new server, this includes the website databases and email accounts
  3. Install and configure your application at the new host
  4. Check the new site on staging / temporary URL
  5. Troubleshoot any errors
  6. Point your domain DNS records to the new web host

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

Option #1: Free Website Migration Service

Flowchart - Site migration using option #1 - Step 1 - Signup
Step 1- Signup
Flowchart - Site migration using option #2 - File request
Step 2 – Migration request
Flowchart - Site migration using option #1 - Step 3 - Wait
Step 3 – Wait

Picking a web host that offers free migration support 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 Services 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

Website Migration Services by Hostinger
Why sweat on website migration? Some hosting companies offer free site migration support and will help new users to move their websites for free. Example in the screenshot above – Hostinger (click here for more details).

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

  • Cloudways – 100% hands-off migration assistance for first site – cloud-based hosting starts at $10/mo.
  • Hostinger – Well-known for its competitive pricing and one-stop hosting solution, single website shared plan starts at $1.99/mo.
  • InMotion Hosting – 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.
  • TMD Hosting – Excellent performance and great price – shared hosting starts at $2.95/mo.

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.

Example: InMotion Hosting

InMotion Hosting Website Tranfer
To initiate a site migration fer at InMotion Hosting, login to AMP dashboard > Account Operations > Website Transfer Request. Click here to initiate InMotion free site migration now.

Example: GreenGeeks

GreenGeeks Website Transfer
You can request for GreenGeeks site migration support after the purchase. To initiate the migration, log in to your GreenGeeks Account Manager > Support > Site Migration Request > Select a Service > Provide basic account information (at your old host) such as control panel URL, and account credential. Note – GreenGeeks site migration service includes not just cPanel transfer, but also migration from the Plesk platform.

Example: Cloudways

Cloudways Migration Service
Cloudways provides free migration assistance for their users (1 site). To start the process, simply fire up your request to their support chat (click here to visit).

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: Manual Website Migration

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 periodic 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.

Make use of Steve's Hosting Comparison Tool at WHTop.com in case you need a second opinion.

2. Transfer 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 an FTP / sFTP agent. I recommend using FileZilla if you are looking for one.

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

Migrating 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.

Exporting and transferring databases using phpMyAdmin
Login to cPanel > Databases > phpMyAdmin > Export.

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.

Migrating a WordPress site

Transferring 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);

Migrating WordPress using common plugins

wordpress migrator plugin
All-in-One WP Migration helps export your WordPress website including the database, media files, plugins and themes with no technical knowledge required

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 clone and migrate a WordPress site to a new web host with no technical knowledge required.

Migrating WordPress using special-built plugins

siteground migrator
SiteGround Migrator automates the transfer of a WordPress site to a SiteGround hosting account.
wpengine migration plugin
WP Engine does not provide free site transfer services but they do have a special-built WordPress website migration plugin for users who are switching in.

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 to Another Host

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 provider needs, are updated in your DNS.

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

If you are migrating 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 (migrating 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.

cPanel email accounts
Adding an email account using cPanel (Screenshot: InMotion Hosting).

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. Cloudways) 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 move your website’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 webpage to a new URL

Redirect 301 /previous-page.html http://www.example.com/new-page.html

Transferring entire directory to a new location

redirectMatch 301 ^/category/?$ http://www.example.net/new-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$ http://www.mywebsite.com/newname.htm? [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:

define('WP_ALLOW_REPAIR',true);

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

http://yourwebsitename.com/wp-admin/maint/repair.php
WordPress repair screen after migration
Either button will work to repair your database but just pick “Repair and Optimize”.
Repair website database during transfer
When the process is completed, you will see a screen that looks the one below. It will even remind you to remove that repair line from your configuration file.

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.

Database Repair - phpMyAdmin
cPanel > Access phpMyAdmin > Click on the database name ito open it.
Database Repair - phpMyAdmin
Once the database loads, check the button that says “Check All / Check tables having overhead”.
Database Table Repair during site migration - phpMyAdmin
Choose “Repair Table in the drop down box to the right of where you just checked the box.
Database Repair - phpMyAdmin
You'll be given a status about whether the tables were repaired and the top of your screen should say “your SQL query has been executed successfully”.

4. Pointing domain DNS to your new web host

Updating DNS record after migration

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 Domain.com.

Tip

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.

Verify DNS propagation after transfer
Tip: Use What's My DNS to perform a DNS lookup to check domain names current IP address and DNS record information from multiple name servers in 18 locations. This allows you to check the latest state of DNS propagation.
Verify DNS propagation after transfer
DNS Map is another free DNS lookup tool to check DNS propagation status from over 20 locations.

Knowing When It's Time to Switch 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 hosts unless it's necessary. After all – why waste time and energy when everything is working all right?

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:

  1. Your site is constantly going down
  2. Your site is too slow
  3. Customer support is not helpful
  4. You nee more space, functionality, or other resources
  5. You are paying too much
  6. You have been hacked, more than once
  7. You have heard about a great service elsewhere

A Good Web Host = Better Sleep at Night

When I switched to InMotion Hosting years ago – the tech support was so helpful and switched my site over safely and soundly while I slept. I awoke to a website that functioned quickly and reliably without a single glitch in service.

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.

FAQs on Web Hosting Migration

What is website migration?

The term website migration refers to two scenarios: 1, The process of migrating a website from one domain to a different one, typically changing the site locations, hosting platform, and design; and 2, The process of migrating a website from one web host to another web host.

We use the term loosely in this article and refer it to the second scenario.

How much does it cost to transfer a website to a new web host?

Free to around $100 based on the complexity of your website. Many web hosts, as mentioned in this article, provide free site migration support to their new customers.

Can I move my website from GoDaddy to another host?

Yes. Moving a website from one host to another can be difficult though, if you have not done it before. If possible, ask your new web host if they would be willing to assist with free website migration – that will get it done for you stress-free.

Hosting companies such as A2 Hosting, GreenGeeks, Hostinger, and InMotion Hosting provide free site migration services to new customers.

Can you transfer a domain name to another hosting site?

Domain names do not have to be registered with your hosting provider. In fact, you can host your domain name with one service provider and link it to hosting provided by another.

Does changing the web host affect SEO?

Generally no – changing web hosts will not affect your website SEO, assuming that you keep your site structure and content the same. However, your hosting quality (uptime, speed, etc) does affect your search rankings in the long term – which is why I highly recommend picking the best web host from our list.

Can we host a website for free?

Yes, it is entirely possible to host a website at zero cost. However, these sites are often limited in many ways, such as having very few resources and enforced host branding. You will also likely be forced to use a subdomain of the free host you are on since real domain names will cost money.

How do I transfer my website to another owner?

Technically, this can be done by the transfer of assets such as web hosting, domain name, plus access to third-party plugins and applications. However, if you're considering doing this it is best to ensure that any finances involved are kept in escrow for your protection.

Also Read

Photo of author

Article by Jerry Low

Keep Reading