How to Migrate a Website to a New Host Without Losing Data or Traffic
A step-by-step website migration plan covering backups, DNS, email, testing and cutover, with a timeline and what to do if something breaks.

To migrate a website without losing data or traffic, copy the whole site to the new host first, test it there using a temporary address, lower your DNS time-to-live, and then switch DNS during a quiet period while keeping the old account active until you have verified everything. The majority of migration problems come from skipping the testing step, forgetting email records or cancelling the old plan too early. This guide walks through the process in order and ends with a troubleshooting section.
Before you start: decide who does the move
Many hosts offer free or paid migration, and some are limited to certain platforms. If your site is a simple WordPress or brochure site, you can migrate it yourself or let the provider do it. If it is an online store, a custom application or a site with heavy email use, consider professional help. Either way, you stay responsible for the backup and for verifying the result, so follow the steps below regardless. The migration checklist tracks them.
Step 1: Take inventory
Write down what exists on the old host:
- Website files and the folder structure.
- Databases, with names and the software they use.
- Domain registration location and DNS provider. These may be different from the host.
- All DNS records: A, CNAME, MX, TXT (including SPF, DKIM and verification records) and any others.
- Email accounts and their content, if email is hosted with the old provider.
- Scheduled tasks, redirects, custom server settings and software versions such as PHP and database engine.
- Third-party services connected to the site, such as payment gateways, email marketing tools and analytics.
Step 2: Back up everything and store a copy elsewhere
Download a complete backup of files and databases to your own computer or cloud storage. A backup stored only on the old host disappears if the account is closed. Confirm that you can open the database dump and that file counts look right.
Step 3: Prepare the new host
Create the account, choose matching software versions where possible and set up a certificate for HTTPS. Compatibility matters: a site built for an older PHP version can break on a newer one, so test rather than assume.
Step 4: Copy the site and test with a temporary address
Upload files, import the database and update configuration with the new database credentials. Then preview the site without changing public DNS. Options include a temporary URL provided by the host or an entry in your computer's hosts file that points your domain to the new server for you only.
Test:
- Every page type, plus images and downloads.
- Forms, login, search, checkout and any booking tools.
- Scheduled jobs and email sent from the site.
- Redirects and 404 handling.
- Page speed compared with the old host.
Step 5: Lower the DNS time-to-live
At least a day before the move, reduce the TTL on your main DNS records to a short value such as five minutes. This shortens how long visitors may still be directed to the old server after the switch. Raise it back afterward.
Step 6: Choose the cutover window
Pick a low-traffic time, such as a weekday evening for a local business. For stores and sites with daily forms, freeze changes briefly: pause new orders or content edits, take a final backup of the database and copy it to the new host so nothing is lost.
Step 7: Switch DNS and keep the old host running
Update the DNS records to point to the new host. If your domain uses the old host's nameservers, either move DNS to a separate provider or change nameservers, and recreate all records first. Do not cancel the old plan yet. Propagation takes time, and some visitors will still reach the old server.
Step 8: Verify after the move
- Load the site from different networks and devices.
- Send and receive test email on every mailbox.
- Confirm the certificate is valid and pages load over HTTPS.
- Submit or check the XML sitemap and watch the Search Console coverage reports for crawl errors.
- Check analytics tracking and conversion tracking.
- Confirm backups and monitoring are running on the new host.
Step 9: Cancel the old plan safely
Wait at least a couple of weeks. Export a final backup. Then cancel in writing, disable auto-renewal and confirm that the domain, if registered with the old provider, is handled as intended.
Typical timeline for a small site
| Phase | Time | Notes |
|---|---|---|
| Inventory and backup | 1 to 2 hours | Longer if email is involved |
| Build and test on new host | 2 to 6 hours | More for stores or custom code |
| TTL change | 24 hours of waiting | Do this early |
| Cutover | 1 to 2 hours | Quiet period |
| Verification | 1 to 3 days | Watch for issues |
| Old plan cancellation | After 2 weeks | Keep a backup |
What to do if something breaks
- Site shows the old content. DNS is still propagating or cached; check with a different network and clear your cache.
- Certificate errors. The certificate may not have been issued yet or may be for a different name. Wait for issuance and re-check.
- Mail stops arriving. Compare MX and TXT records with your inventory. Missing SPF or DKIM records cause delivery problems.
- Broken pages or errors. Check error logs; version differences in PHP or missing extensions are common causes.
- Forms or checkout fail. Confirm API keys, webhook addresses and allowed server addresses for third-party services.
- Rankings drop temporarily. Check that redirects and robots rules are unchanged, and give search engines time to re-crawl.
Mistakes to avoid
- Changing DNS before testing the new site.
- Forgetting MX records and losing email.
- Cancelling the old host the same day.
- Moving during a sales peak.
- Changing the site's design or URL structure at the same time as the host. Make one change at a time.
Frequently asked questions
How long does a website migration take?
A simple site can move in a day of work, with DNS propagation taking from minutes to a couple of days. Stores and custom applications take longer to test.
Will I have downtime?
With careful preparation, you can avoid visible downtime, though brief interruptions during final data sync are possible for dynamic sites.
Should I use a plugin or the host's migration service?
Both can work. Use whichever you can verify. If you cannot test the result yourself, ask for professional help.
Does moving hosts require changing my domain registrar?
No. Hosting and domain registration are separate. You only need to change DNS records or nameservers.
Sources and further reading
- ICANN - background on domains and DNS.
- Google Search Central - official guidance on site moves and crawl monitoring.
- WordPress.org - documentation on moving WordPress sites.
