X
X
X
X

Switching Web Hosts: How to Migrate Your Website and Email Without Downtime

HomepageArticlesWeb HostingSwitching Web Hosts: How to Migrate...

In short: Switching web hosts is something your visitors will not notice if it is done in the right order. First list everything that needs to move and take a full backup; transfer files, databases and email to the new host; test the site without changing DNS; then point DNS to the new server and keep the old hosting active for a few more days. Downtime and data loss almost always come from skipping this order.

  • Who it is for: Businesses and site owners who want to move their website and business email to another hosting provider.
  • How long it takes: The transfer itself takes a few hours for most sites; DNS changes can take from a few hours up to 48 hours to propagate everywhere.
  • What you need: Access to the old hosting control panel, the domain's DNS management and the new hosting account.

Before You Move: What Needs to Be Migrated?

The most common mistake is thinking only about website files and forgetting the other components. Before you start, list everything you use on the old host:

  • Website files: Usually everything in the public_html folder, including hidden files such as .htaccess.
  • Databases: MySQL/MariaDB databases used by WordPress, e-commerce and similar software.
  • Email accounts and mailboxes: The account list, forwarders and the old messages stored on the server.
  • DNS records: A, MX, CNAME and TXT records, especially SPF, DKIM and verification TXT records.
  • Scheduled tasks: Cron jobs that run backups, newsletters or stock updates.
  • Server settings: PHP version and extensions, subdomains, redirects and FTP accounts.

Taking a screenshot or export of your DNS records makes it easy to spot a missing record after the switch. We explain what each record type does in our DNS records guide.

Step-by-Step Website Migration When Changing Hosts

1. Take a full backup and download it

Take a full backup of your files and databases from the control panel, and do not leave it only on the server; download it to your computer or to cloud storage. If anything goes wrong during the move, this backup is the only point you can return to. Our backup guide explains what to back up and how often.

2. Transfer files and the database to the new host

Upload the files to the same folder on the new host via FTP or the file manager. Create an empty database and user on the new host and import the database from your backup. Then update the database name, user name and password in the site's configuration file; in WordPress this file is wp-config.php.

Also check that the PHP version on the new host is compatible with the old server. Software written for a very old PHP version may throw errors on a current one.

3. Test the site without changing DNS

While visitors still see the old server, you can test the site on the new server from your own computer. To do this, add the new server's IP address and your domain to the hosts file on your computer:

  • Windows: C:\Windows\System32\drivers\etc\hosts
  • macOS and Linux: /etc/hosts

The line should look like 203.0.113.10 yourdomain.com www.yourdomain.com (replace the IP with your new server's address). Seeing an SSL warning at this stage is normal; the certificate is usually issued after DNS points to the new server. Try the pages, the login screen, forms and, if you have one, the checkout. Remember to remove the line once testing is done.

4. Lower the TTL in advance

The TTL (Time To Live) value of a DNS record determines how long it is cached. If you lower the TTL of your A and MX records to a small value such as 300 seconds 24-48 hours before the switch, the DNS change will propagate much faster. You can raise the TTL again once the move is complete.

5. Point DNS to the new server

There are two ways to switch:

  • Changing only the records: DNS management stays where it is; you point the A record to the new server's IP and the MX record to the new mail server. If you lowered the TTL beforehand, the change propagates within minutes.
  • Changing nameservers: You move DNS management entirely to the new provider. In this case, make sure the DNS zone at the new provider contains every record. Nameserver changes can take up to 24-48 hours to propagate. We cover the steps in our nameserver guide.

You do not need to transfer your domain to another company in order to move your hosting. A domain transfer is a separate process; if you wish, you can do it after the migration by following our domain transfer guide.

6. Move email without losing messages

Email migration is a step that should be planned separately from the website:

  • Create the same accounts with the same names on the new server.
  • Copy the messages in the old mailboxes to the new accounts over IMAP.
  • Point the MX record to the new server.
  • While DNS propagates, some messages will still reach the old server for a while; run the sync once more to move them to the new mailboxes.
  • If necessary, update the account settings in Outlook, phones and tablets. See our IMAP and SMTP setup guide for the settings.

Do not forget to update your SPF and DKIM records for the new mail server; otherwise the messages you send may end up in spam.

7. Run post-migration checks

  • Does the site load on every page, and is the SSL certificate valid?
  • Do HTTP-to-HTTPS and www redirects work? See our HTTPS migration guide for details.
  • Are contact forms and order emails being sent?
  • Does sending and receiving email work on both computers and phones?
  • Are cron jobs set up and running on the new server?
  • Does Google Search Console show crawl errors or a sudden drop?

Common Migration Mistakes

  • Cancelling the old hosting right away: If the old account is closed before DNS has propagated everywhere, some visitors cannot reach the site and email arriving in that period may be lost. Keep the old hosting active for at least a few days after the switch.
  • Forgetting email: The site is moved and the MX record changed, but the messages in the old mailboxes are never transferred.
  • Adding content during the move: Orders taken or content added on the old site after the transfer will not exist on the new server. Pause content updates on migration day or re-import the database at the last moment.
  • Missing DNS records: When nameservers are changed, TXT records used for verification and email security are not added to the new zone.
  • Hard-coded old addresses: Old server paths or IP addresses left in configuration files cause errors.

Hosting Migration Checklist

  • Have you listed files, databases, email accounts, DNS records and cron jobs?
  • Has a full backup been taken and stored off the server?
  • Have files and the database been transferred and the configuration file updated?
  • Has the site been tested on the new server using the hosts file?
  • Was the TTL lowered 24-48 hours before the switch?
  • Have the A and MX records or the nameservers been pointed to the new server?
  • Has email been transferred, with a final sync after the switch?
  • Have SSL, redirects, forms, email and cron jobs been checked?
  • Is the old hosting being kept active until you are sure everything works?

Free Migration to CAP Hosting

When you move to CAP Hosting, you do not have to do most of these steps yourself. We migrate your website, databases and email from another provider to your CWP account free of charge. After choosing your web hosting package, simply submit your migration request through our support system; our team handles the transfer and testing and guides you step by step through the DNS switch. All packages include a free SSL certificate, which is installed automatically once DNS points to the new server. If you have any questions, get in touch with us.

Frequently Asked Questions

Will my website go down when I change hosts?

A migration done in the right order causes no downtime. The site is first copied to the new server and tested, DNS is pointed only when everything is ready, and the old hosting stays active during the process. While DNS propagates, some visitors see the old server and some the new one; since both serve the same site, nobody notices.

How long does a DNS change take to propagate?

If only the A and MX records are changed and the TTL was lowered in advance, it usually propagates within minutes. A nameserver change can take up to 24-48 hours.

Will I lose email when migrating hosting?

No email is lost if the messages in the old mailboxes are copied to the new accounts over IMAP and a final sync is run after the MX record is changed. Keeping the old hosting active until DNS has fully propagated also protects messages that arrive during that time.

Do I need to transfer my domain to change hosts?

No. The domain can stay with its current registrar; you only need to point the DNS records or nameservers to the new host. A domain transfer is an optional, separate process.

Does migrating hosting affect my SEO rankings?

Rankings are not affected if URLs, content and redirects are moved unchanged. After the move, simply check that the site loads over HTTPS, redirects work and Search Console shows no crawl errors.

Is migration to CAP Hosting free?

Yes. We migrate your website, databases and email from another provider to your CWP account free of charge. After choosing your package, simply submit your migration request through our support system.


Powered by WISECP
Top