The order that prevents downtime
Here's the trick hosting marketing never explains: your website doesn't move when you sign up somewhere new. Visitors find your site through DNS (the Domain Name System, the internet's address book). As long as DNS points at your old server, the old server answers. So you can build a full copy on the new host, poke at it, fix it, and nobody sees a thing until you change DNS.
That gives you a safe sequence:
- Open the new account first. Pick a plan, but don't cancel anything yet.
- Inventory and lower TTL. Write down every DNS record and shorten how long it's cached.
- Back up everything. Files, databases, and email, stored somewhere that isn't either host.
- Copy the site to the new host. By hand, with a plugin, or with the host's migration service.
- Test on the new server while the public still sees the old one.
- Switch DNS and get SSL working on the new host.
- Watch, verify, then cancel the old plan.
Moving because a renewal bill is coming? Start at least a couple of weeks before the renewal date. That leaves room for a slow DNS change or a stubborn database import without paying for another full term.
Prep: inventory your DNS and lower the TTL
Log in wherever your DNS is managed. That might be your registrar (where you bought the domain), your current host, or a DNS service. Screenshot or export every record: A and AAAA (point the domain to a server's IP address), CNAME (aliases like www), MX (email), and TXT (verification and email-authentication records). You'll recreate these on the other side, and a missing TXT record can quietly break email delivery or a connected service.
Next, the TTL. TTL (time to live) is a number on each DNS record that tells resolvers how long they can keep serving a cached copy before checking for a fresh one, as Cloudflare's Learning Center explains. If your A record has a long TTL, some visitors may keep landing on the old server for that long after you change it. That's what people mean by "waiting for propagation."
The fix is to shrink the TTL before the move. Cloudflare's DNS migration guidance says to lower TTLs on critical records at least 24 to 48 hours ahead of the change and names 300 seconds (five minutes) as a common migration value. Once the old, longer TTL has expired everywhere, your switch will spread quickly. After the move settles, you can raise it again.
Using DNSSEC? If you're changing nameservers on a domain with DNSSEC turned on, Cloudflare's guidance says to remove the old DS records first and wait out their TTL. Change nameservers too early and the domain can become unreachable for resolvers that validate DNSSEC. If you've never heard of DNSSEC, you probably aren't using it, but check your registrar's settings to be sure.
Back up everything, including email
A migration is the moment you most need a backup you control. Don't rely on the old host's backups being there after you cancel. Grab:
- All website files, including hidden files like
.htaccess - Every database, exported as a
.sqlfile - Email: download mailboxes with an email app over IMAP, or use the host's export tool
- Cron jobs (scheduled tasks), redirects, and any custom server settings
- Your DNS record list from the prep step
Store the backup on your own computer or cloud storage. Then open the zip and confirm it actually contains your files. An empty or half-finished archive is worse than none, because it gives you false confidence.
WordPress, static, and custom sites move differently
| Site type | What to copy | Watch for |
|---|---|---|
| WordPress | All files plus the database; update wp-config.php with the new database details | If the domain changes, use a serialization-safe search-replace tool |
| Static site | The folder of HTML, CSS, JS and images | Redirects and custom error pages are often set in server config, not the files |
| Custom app (PHP, Node, Python) | Code, database, environment variables, scheduled jobs | Match language and database versions, and recreate secrets and cron jobs |
WordPress specifics
The official WordPress guide to moving sites covers the manual route: copy the files and database, update wp-config.php if the database name or user changes, and only run a search-replace if your URLs are changing. It warns that a plain find-and-replace can corrupt serialized data (settings stored with exact string lengths). Use a tool built for it, like WP-CLI's search-replace command or a plugin.
If you'd rather click than type, Duplicator on wordpress.org is a plugin that packages a site's files and database so you can move or clone it to another host. Its listing shows a free Lite version and a paid Pro tier. Whatever plugin you use, keep your own manual backup too.
"Free migration" from the new host
Many hosts advertise free migrations. Read the new host's own migration page before counting on it: which plans qualify, how many sites are included, whether email is moved, and how long the queue is. If it doesn't say, ask in writing before you buy. Even with a free service, keep your own backup and do your own testing.
Test on the new server before anyone sees it
You want to load the copied site on the new server while the rest of the world still sees the old one. Two common ways:
- Temporary URL or preview link. Many hosts give you one. It's quick, but WordPress and some apps can redirect it back to your real domain, so it doesn't always show a true picture.
- Your computer's hosts file. This local file can override DNS for just your machine. Add a line with the new server's IP address and your domain, and your browser goes to the new host while everyone else still reaches the old one. Delete the line when you're done.
Click through the pages that matter: home, a few posts or products, contact forms, checkout, login, search. Submit a test form. Look for missing images or broken layouts, which usually point to missing files or a bad URL replacement.
Email: the step everyone forgets
If your email runs through your hosting plan, it's part of the move. Email delivery depends on MX records, the DNS entries that tell sending servers which mail server handles your domain, per Cloudflare's MX explainer. Change nameservers without recreating those records and mail can bounce or vanish.
- Decide where email will live: the new host, or a separate email provider
- Create every mailbox and alias in the new place before switching DNS
- Recreate MX records and email TXT records exactly as the new provider specifies
- Copy old messages over IMAP if you want your history
- Update passwords and server settings in your phone and desktop mail apps
Already using a separate email provider? Then email doesn't need to move. Just make sure those MX and TXT records come along unchanged if you switch nameservers.
Flip DNS, then sort out SSL
You have two ways to point the domain at the new host:
- Change the A (and AAAA) record to the new server's IP and leave nameservers alone. This is precise and usually the safest when your DNS is managed separately from hosting.
- Change the nameservers to the new host's. This hands the whole DNS zone to the new host, so every record from your inventory has to exist there first.
Then the certificate. If the new host uses Let's Encrypt, the most common check is the HTTP-01 challenge. Let's Encrypt's challenge documentation explains that it fetches a file from your domain over port 80, so the domain has to reach the new server first. That's why many hosts can only issue the certificate after DNS switches, leaving a short window of browser warnings. The DNS-01 challenge proves control with a TXT record instead and doesn't need the site to be live, so ask whether the new host supports it or lets you upload an existing certificate.
Keep the old site frozen. During the switch, some visitors still reach the old server. Avoid publishing posts, taking orders, or changing settings there, or that new data will be stranded on the old host.
After the move: checklist, then cancel
- Look up your domain with a DNS lookup tool and confirm it returns the new IP
- Padlock shows on both
wwwand non-wwwversions; HTTP redirects to HTTPS - Forms deliver, email sends and receives, checkout or logins work
- Scheduled tasks and automatic backups are set up on the new host
- Raise your DNS TTL back to its normal value
- Take a fresh full backup from the new host
Give it a quiet week. Then, and only then, cancel the old plan. Download one last backup first, and turn off auto-renew so you aren't billed again. If you're hoping for money back, see how to cancel web hosting and actually get your money back. If your domain was bundled with the old plan, sort that out before canceling.
FAQ
How long does it take to move a website to a new host?
Copying a small site can take under an hour, but plan for a few days end to end. You need time to lower the DNS TTL ahead of the switch, test on the new server, and let cached DNS records expire after you change them.
Will my site go down when I switch hosts?
It shouldn't if you follow the right order. The old host keeps serving visitors until DNS points to the new one, so build and test the new copy first, lower your TTL early, and keep the old plan active until the move is finished.
Do I need to move my domain when I change hosts?
No. Your domain can stay at its current registrar. You only need to update its DNS records or nameservers so they point to the new host. If the domain was bundled with your old hosting plan, check how to keep control of it before you cancel.
What happens to my email when I move hosts?
If your email is hosted on the old plan, it stops working once you cancel or change nameservers, unless you set up mailboxes in the new location and recreate your MX records. If your email is with a separate provider, keep those records unchanged.
Should I cancel my old hosting before or after migrating?
After. Keep the old plan running until the new site has been live and stable for a while, and download one last backup before you cancel.