ServerNeed — This Year's Best Offers For You

ServerNeed — More Than Hosting
Hosting

How to Move a Website to a New Host Without Downtime

A step-by-step plan for moving a website to new hosting: inventory, copying files and databases, testing with a hosts file, lowering DNS TTL and switching over safely.

5 min read
Straight road with a yellow centre line
Table of Contents
  1. Step 1: Take an inventory
  2. Step 2: Lower the DNS TTL
  3. Step 3: Set up the new hosting
  4. Step 4: Copy files and databases
  5. Step 5: Test before switching DNS
  6. Step 6: Freeze changes and do a final sync
  7. Step 7: Switch DNS
  8. Step 8: Check email carefully
  9. Step 9: Keep the old hosting for a few days
  10. Migration checklist
  11. Frequently Asked Questions
  12. Related reading
  13. Sources

To move a website to a new host without downtime, run the old and new copies side by side: copy the site to the new server, test it there before anyone else sees it, lower your DNS TTL in advance, and only then point the domain at the new server. Keep the old hosting active until DNS has fully switched and you have checked email and forms.

This plan works for most PHP sites. WordPress owners can follow the more specific how to migrate a WordPress site to a new host; whole-server moves are covered in server migration checklist.

Step 1: Take an inventory

Before copying anything, list everything the site depends on:

  • Website files, including uploads and any folders outside public_html.
  • Databases and the credentials the site uses to connect.
  • Email accounts, forwarders and filters, if email is hosted on the same account.
  • DNS records: A, CNAME, MX, TXT (SPF, DKIM, verification records) and any subdomains.
  • Cron jobs, scheduled tasks and background processes.
  • PHP version and extensions, and any special settings (memory_limit, upload size).
  • SSL certificates, and any third-party services that whitelist your server's IP address.

Export the DNS zone first

Copy every DNS record from your current DNS provider into a document. Missing a TXT or MX record during a move is one of the most common causes of broken email after a migration.

Step 2: Lower the DNS TTL

The TTL (time to live) tells resolvers how long to cache a DNS answer. If your A record has a TTL of 24 hours, some visitors may keep reaching the old server for up to a day after you change it.

At least one full TTL period before the move (for example 24–48 hours ahead), lower the TTL on the records you will change to a short value such as 300 seconds. After the switch, you can raise it again. See DNS propagation explained.

Step 3: Set up the new hosting

  • Match the PHP version and extensions, or move to a newer supported version you have tested.
  • Create the databases and users.
  • Create email accounts with the same addresses.
  • Add the domain to the new account.

Step 4: Copy files and databases

  • Files: download from the old host and upload to the new one, or use a full cPanel backup and ask the new host to restore it. See how to upload website files.
  • Database: export it (phpMyAdmin or mysqldump) and import it on the new server. See how to create a MySQL database in cPanel.
  • Configuration: update the database name, user and password in the site's configuration file if they changed.

Step 5: Test before switching DNS

You can view the site on the new server before changing DNS by editing your computer's hosts file to map the domain to the new server's IP address:

203.0.113.10  example.com www.example.com

(Replace the documentation address above with your new server's IP.) Then browse the site and check:

  • pages, images and links load correctly;
  • forms send, logins work, checkout completes in test mode;
  • there are no errors in the server error log;
  • SSL works (issue a certificate on the new host if needed).

Remove the hosts-file line when you finish testing.

Step 6: Freeze changes and do a final sync

For sites that change often (orders, comments, new posts), pick a quiet time, pause content changes on the old site, then copy the database again so nothing is lost between the first copy and the switch.

Step 7: Switch DNS

Update the A record (or change nameservers if the new host manages DNS) to point at the new server. With a short TTL, most visitors move over within minutes, though some resolvers take longer. See how to point a domain to hosting.

Step 8: Check email carefully

If email moves too:

  • update MX records and check SPF and DKIM records for the new server;
  • for a while, some mail may still arrive at the old server; check old mailboxes and copy messages across;
  • set up the new mailboxes on phones and computers. See how to set up email on your phone and Outlook.

Step 9: Keep the old hosting for a few days

Do not cancel the old plan immediately. Keep it for at least several days so you can retrieve anything you missed and fall back if needed. Once traffic and email are clearly using the new server, raise the TTL again and cancel the old service.

Migration checklist

  • Inventory of files, databases, email, DNS, cron jobs and settings
  • TTL lowered at least one TTL period in advance
  • New hosting set up with matching PHP and extensions
  • Files and database copied and configuration updated
  • Site tested through the hosts file, including SSL and forms
  • Final database sync during a quiet period
  • DNS switched and propagation checked
  • Email records and mailboxes verified
  • Old hosting kept until everything is confirmed

Frequently Asked Questions

How long does a website migration take?

The copying itself can take minutes to hours depending on size. The planning, TTL change and checks mean it is wise to allow a few days from start to finish.

Will my search rankings drop if I change hosts?

Changing host without changing URLs does not normally affect rankings, provided the site stays available and performs at least as well. Avoid long outages and broken pages during the move.

Can my new host migrate the site for me?

Many hosts offer migration help. Even then, keep your own backup and check the result before switching DNS.

For hosting fundamentals, see what is web hosting. If you are moving to ServerNeed, compare the shared hosting plans and contact support about migration help.

Sources

Last updated 7 October 2026

View All Articles