SideBySide Hosting
Migration Guide

How to Migrate Your Website to a New Host Without Downtime

Switching hosts after a Black Friday purchase does not have to mean a broken site or lost email. The secret is doing things in the right order and never cancelling the old plan too early.

8 min read Updated November 2026 SideBySide Hosting Editorial Team
In this guide
  1. Before you start: take inventory
  2. Step 1: Back up everything
  3. Step 2: Set up the new hosting account
  4. Step 3: Copy files and database
  5. Step 4: Test before you switch DNS
  6. Step 5: Lower TTL, then update DNS
  7. Step 6: SSL, email and final checks
  8. Common migration mistakes to avoid
  9. Step 7: Cancel the old host last
  10. Frequently asked questions

Key takeaways

  • Keep your old hosting active until the new site is fully tested and DNS has switched over.
  • Take a complete backup of files, database and email before you touch anything.
  • Test the site on the new host before changing DNS, using a temporary URL or your computer’s hosts file.
  • Lower your DNS TTL a day or two in advance so the switch propagates faster.
  • Moving hosting and moving your domain are separate tasks. You can change hosts without transferring the domain.

A Black Friday deal on new hosting is only worth it if you can get your site there in one piece. Migration sounds intimidating, but the process is predictable: copy everything, test it in the new home, point your domain at the new server, and only then shut down the old one. Most problems come from doing those steps out of order. This guide walks through each one, with notes for WordPress sites and for email, which is the part people most often forget.

Before you start: take inventory

Spend fifteen minutes listing everything your current host does for you. It is easy to move the website and forget something that quietly lived alongside it.

✓
Tip

Take screenshots of your current DNS zone. If anything goes wrong later, that snapshot makes it easy to see exactly what changed.

Step 1: Back up everything

Before migrating, make a complete, downloadable backup and store it somewhere other than either host, such as your computer or a cloud drive. That copy is your safety net if anything goes wrong in transit.

WordPress’s own documentation explains that a full backup needs both the database and the files, recommends backing up before upgrades or moves, and suggests keeping several recent copies in different places, such as cloud storage and a local computer.

Step 2: Set up the new hosting account

Log in to your new host and add your domain to the account. Create any databases and database users you will need, and note the credentials. If your new host offers free migration, this is the point to request it, then skip ahead to testing. If you are doing it yourself, carry on.

i
Good to know

Adding your domain to a new hosting account does not affect your live site. Nothing changes for visitors until you update DNS.

Step 3: Copy files and database

  1. Upload your files.Use SFTP or the new host’s file manager to upload your site files into the correct web root folder.
  2. Import the database.Use the new host’s database tool to import the export you made.
  3. Update configuration.Update the database name, username, password and host in your site’s configuration file. For WordPress, that is wp-config.php.
  4. Recreate extras.Set up cron jobs, redirects and any server settings from your inventory.

WordPress shortcut

For WordPress sites, a migration plugin can bundle files and database together and restore them on the new host. That is often the easiest path for smaller sites. If you are keeping the same domain, you generally do not need to change URLs inside the database. If the domain is changing, follow WordPress’s guidance on updating site URLs carefully: a plain find-and-replace across the whole database can break serialized data that some themes and widgets store. The official guide points to dedicated tools such as WP-CLI’s search-replace command instead.

Step 4: Test before you switch DNS

This is the step that prevents downtime. You want to see the site running on the new server while visitors still see the old one. Two common ways to do that:

Easiest

Temporary or preview URL

Many hosts provide a temporary address or preview link for a new site. Check your new host’s dashboard.

Most accurate

Edit your hosts file

Your computer’s hosts file can map your domain to the new server’s IP address, just on your machine, so you can browse the real domain on the new host.

While testing, check:

Remember to remove the hosts file entry when you finish, or your computer will keep pointing at the new server regardless of public DNS.

Step 5: Lower TTL, then update DNS

Every DNS record has a time to live, or TTL, which tells resolvers how long they may cache it. A long TTL means some visitors could keep reaching your old server for longer after you make a change. A day or two before you switch, lower the TTL on the records you will change, then wait for the old TTL to expire.

When you are ready, you have two options:

OptionWhat you changeWhen to use it
Change nameserversAt your domain registrar, point nameservers to the new hostWhen the new host will manage your whole DNS zone. Recreate all records, including email, there first.
Change A recordsIn your existing DNS, update the A (and AAAA) records to the new server’s IPWhen you want to keep DNS where it is and only move the website.
!
Watch out

Switching nameservers replaces your entire DNS zone. If you forget to recreate MX and TXT records on the new host first, email can stop arriving. Compare against your screenshots before you switch.

Step 6: SSL, email and final checks

Once DNS points to the new server, issue or activate an SSL certificate there. Many hosts do this automatically using Let’s Encrypt once the domain resolves to them. Then visit the site over HTTPS and check for mixed-content warnings.

If email is moving too, create the same mailboxes on the new host before switching MX records, then import messages or let your mail client re-sync. If email is staying put, double-check that MX records were not changed by accident.

If your site uses a CDN or a separate DNS provider, confirm that it now points to the new server’s address too, and clear its cache so visitors do not see stale pages from the old host.

Finally, re-run your test checklist on the live domain, and keep an eye on any uptime monitor or analytics for a few days.

Common migration mistakes to avoid

Most migrations that go wrong fail in one of a handful of predictable ways. Knowing them in advance is most of the cure.

MistakeWhat happensHow to avoid it
Cancelling the old host firstThe site goes offline with nowhere to fall back toCancel last, after testing and DNS propagation
Forgetting email DNS recordsEmail silently stops arriving after a nameserver changeRecreate MX, SPF and DKIM records before switching
Skipping the test stepBroken pages or forms are discovered by visitorsTest with a preview URL or hosts file before DNS changes
Leaving TTL highSome visitors keep hitting the old server for longerLower TTL a day or two ahead
Editing the old site mid-moveNew posts, orders or comments are lostPause content changes, or re-sync the database just before the switch
Blind find-and-replace on URLsWidgets and theme settings breakUse a serialization-aware tool when the domain changes

Timing the move

Pick a quiet period for your audience, such as a weekday evening for a local business or a weekend for a business-to-business site, and avoid your busiest sales days. If you run an online store, it is usually wise not to migrate in the middle of a holiday promotion. A Black Friday hosting purchase can wait a week or two for a calm switchover; your hosting term generally starts when you buy, so factor that into your timeline, but do not let it rush you.

Step 7: Cancel the old host last

Wait until you are confident everything works, DNS has fully propagated, and you have a fresh backup from the new host. Only then cancel the old plan. Download one last copy from the old account before you do, just in case.

Check whether cancelling hosting also affects a domain or email registered with the same provider. If your domain is registered there and you want to move it too, that is a separate domain transfer process under ICANN’s transfer policy, which involves unlocking the domain and getting its authorization code. Registrars may refuse a transfer within 60 days of registration or of a previous transfer, so check those dates first. Plan your old host’s renewal date into this: our guide to renewal-price traps explains how to avoid being billed for another term you will not use.

Frequently asked questions

Will my website go down when I change hosts?

It does not have to. If you keep the old hosting active, test the site on the new server first, and lower your DNS TTL before switching, most visitors will not notice the move.

How long does DNS propagation take?

It depends on the TTL values on your records and on how resolvers cache them. Lowering TTL ahead of time helps changes take effect faster. Keep the old host running until traffic has clearly moved.

Do I need to transfer my domain when I change hosts?

No. Hosting and domain registration are separate. You can keep your domain at its current registrar and simply point DNS to the new host.

Will I lose email when I migrate?

Not if you plan for it. Recreate mailboxes and DNS records like MX, SPF and DKIM on the new host before switching, or leave email where it is and make sure those records stay unchanged.

When should I cancel my old hosting?

Only after the site is fully tested on the new host, DNS has switched, and you have a fresh backup. Download a final copy from the old account before cancelling.

Choosing where to move?

Compare hosts side by side, including migration help, before you pick a new home for your site.

Compare hosts →

Sources

  1. Moving WordPress — WordPress Developer Resources
  2. WordPress Backups — WordPress Developer Resources
  3. Transfer Policy — ICANN
  4. How It Works — Let’s Encrypt
  5. What is time-to-live (TTL)? — Cloudflare Learning Center

SideBySide Hosting publishes independent information to help you compare and switch web hosts. We are not affiliated with any hosting provider, and this article contains no affiliate links. Control panels and migration tools differ between hosts, so follow your providers’ own documentation, and always keep a full backup before making changes. Prices and terms change; verify current details on provider sites.