Article 09 of 86Domain guide

Move a Website to a New Host Without Downtime (2026 Guide)

Move your site to a new host safely: back up, copy files, test, update DNS, and avoid downtime and lost email.

8 min read86 articles in the journal

Switching web hosts often fills site owners with dread. The nightmare scenario is all too familiar: a corrupted database export, broken stylesheets, missing media files, or worst of all, a blank white screen telling visitors that your site is unreachable while business emails bounce into the void.

Migrating to a faster, more dependable hosting provider should feel rewarding, not terrifying. When executed with the right methodology, a website migration can take place in broad daylight with zero seconds of unplanned downtime and zero lost customer transactions. In this step-by-step guide, we show you how to stage your files, test the migration locally before switching DNS, safeguard your email records, and audit the cutover with precision.

The golden rule: copy first, switch last

The fundamental secret to a zero-downtime website migration is simple: copy first, switch last. You build, configure, and test an identical, fully functional clone of your website on the new host while your existing host continues serving live visitor traffic undisturbed.

Never cancel your existing hosting account or delete files before the new server is fully verified. By running both servers concurrently for a few days, visitors experience seamless performance throughout the transition, and you retain an instant rollback fallback if anything goes wrong.

Before you start: compatibility, quotas, and timing

Proper preparation prevents ninety percent of all migration mishaps. Address these four items before touching a single file:

1. Check PHP and database compatibility

Verify which PHP version and database software (MySQL or MariaDB) your current site requires. If your current server runs PHP 8.1 and the new host defaults to PHP 8.3, check that your theme and plugins support the newer version without deprecation errors.

2. Confirm disk space and inode limits

Ensure your new hosting plan has sufficient storage and inode limits to unpack your complete site archive. Running out of disk space during file extraction causes silent data corruption.

3. Schedule during a traffic lull

Review your analytics and pick a window with historically low visitor traffic, such as a late Tuesday night. Never perform a migration during major marketing campaigns or product launches.

4. Freeze site updates on the old server

Do not publish new articles, change settings, or install plugins on the old server once you take your migration backup. This prevents database desynchronization during the transition.

Step 1: Take a full backup of files and databases

Never touch DNS or change account configurations until you possess two independent, complete backups stored safely on your local computer.

  • Export the database: Log in to phpMyAdmin or run a command-line export to download a complete, uncompressed .sql dump of your site database.
  • Archive all website files: Compress your entire web root directory (often public_html), ensuring hidden configuration files like .htaccess or wp-config.php are included in the .zip or .tar.gz archive.
  • Save an offsite copy: Keep one copy on your local machine and an extra copy on cloud storage like Google Drive or Dropbox before continuing.

Step 2: Set up the new host and migrate data

Log in to your new hosting account and stage the clone of your site:

1. Add your domain to the new control panel

Create your domain name inside cPanel, Plesk, or your host's custom dashboard as an add-on domain or primary web root.

2. Upload and extract files

Upload your compressed file archive to the new document root via SFTP or the host's file manager, then extract the contents into place.

3. Create the new database and import data

Create an empty database, generate a new database user with a complex password, grant full privileges, and import your .sql backup file using phpMyAdmin or the MySQL command line.

4. Update connection credentials

Open your site configuration file (such as wp-config.php for WordPress) and update the database name, username, password, and hostname to match your new host's credentials.

Step 3: Test the migration locally before switching

How can you verify that the website runs on the new server when your domain still points to the old server? The professional technique is to use your local computer's hosts file.

The hosts file on your operating system overrides public DNS for your computer alone. By mapping your domain to the new server IP address, your browser connects directly to the new host while the rest of the world continues viewing the old server.

How to configure your local hosts file

Find your new server IPv4 address in your hosting dashboard. Open your hosts file with administrator permissions:

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

Add a line at the bottom pairing your new server IP with your domain:

192.0.2.10 example.com www.example.com

Save the file, open a private browser window, and navigate to your site. Test navigation links, submit test contact forms, check shopping cart flows, and ensure images load. Once satisfied, delete that line from your hosts file.

Step 4: Lower DNS TTL values in advance

Time to Live (TTL) specifies how many seconds recursive resolvers cache your DNS records before querying your authoritative nameservers again. Standard TTL values are often 86,400 seconds (twenty-four hours) or 14,400 seconds (four hours).

Twenty-four to forty-eight hours before your scheduled migration, log in to your DNS provider and reduce the TTL on your root A record, www CNAME record, and MX records to 300 seconds (five minutes).

This single step ensures that when you point traffic to the new server, resolvers across the globe pick up the update in minutes rather than caching the old IP address for days. To learn more about propagation caching, read our guide on how long does DNS propagation take.

Step 5: Update your DNS records or nameservers

Once your site clone is tested and your TTL has expired, you are ready to make the official cutover. You have two options depending on where you manage DNS:

Option A: Point nameservers to your new host

If your new host provides managed nameservers, log in to your domain registrar and update your nameserver delegation (such as ns1.newhost.com). For step-by-step instructions, read our guide on what are nameservers and how to change them. Ensure all existing email MX records are recreated on the new host first.

Option B: Update A and CNAME records directly (recommended)

If you manage DNS through Cloudflare or your registrar, keep your nameservers untouched. Simply edit your root domain A record to point to the new server IP, and ensure the www record points correctly. This approach provides near-instant propagation with minimal risk to unrelated services.

Step 6: Safeguard business email and MX records

The single most frequent casualty of website migrations is business email. If your email is tied to your cPanel hosting account and you switch nameservers without preparing, inbound emails will bounce or disappear into a void.

  • If you use third-party email (Google Workspace, Microsoft 365): Verify that your MX records, SPF TXT records, and DKIM keys are copied exactly into the new DNS zone file before you switch nameservers. External mail flow will continue without interruption.
  • If you use host-provided cPanel email: Recreate the identical email accounts and passwords on the new host before switching DNS. Use an automated IMAP sync tool (such as MailSync) to copy old email messages from the old server to the new server.

Step 7: Verify propagation and audit live records

Once you update DNS, do not cancel your old hosting plan immediately. Keep both accounts active for at least seven days while traffic transitions cleanly across global networks.

Perform these three validation checks:

  • [✓]Run a global DNS audit: Use our free DNS Lookup Tool to verify that resolvers worldwide return your new server IP address.
  • [✓]Verify SSL certificate issuance: Test your site with our SSL Checker to ensure your new server successfully generated an active, valid SSL certificate without hostname mismatch errors.
  • [✓]Monitor old server access logs: Inspect access logs on the old hosting server. When requests drop to zero over a forty-eight hour period, you can safely decommission the old account.

Common migration problems and how to resolve them

Even well-planned migrations can encounter minor post-launch glitches. Here is how to troubleshoot the most common issues:

Mixed content security warnings

If browsers show a warning or refuse to load images, your database may contain hardcoded http:// URLs. Run a search-and-replace tool (such as Better Search Replace for WordPress) to update all links to https://.

Old DNS caching on your local device

If your site still loads from the old server on your home computer, your local operating system or router is caching the old IP. Flush your DNS resolver cache by running ipconfig /flushdns in Windows or sudo dscacheutil -flushcache on macOS.

Missing SSL certificates on the new host

Some automated SSL systems like Let's Encrypt fail if triggered before DNS points to the new server. Once your DNS switch is live, re-run the SSL installer in your new control panel to issue the certificate immediately.

Frequently asked questions & conclusion

Can I migrate a website during normal business hours?

Yes, if you follow the copy-first switch-last method. Because both servers run concurrently with identical content, visitors will not experience downtime regardless of when their local ISP updates its DNS cache.

How long should I keep my old hosting account open?

Keep your old hosting account active for at least five to seven days after switching DNS. This provides ample time for straggling DNS caches to expire and guarantees you retain your old files if an unexpected bug emerges.

Will migrating to a new web host hurt my search rankings?

No. If your domain name, URL structures, and page contents remain identical, search engines will not penalize your site. In fact, moving to a faster host with lower server response times often improves your organic SEO performance.

Moving your website to a better hosting provider does not have to be a nerve-wracking gamble. By taking comprehensive backups, staging files in advance, testing your clone locally, and coordinating your DNS cutover, you can upgrade your infrastructure smoothly without losing a single visitor.

To prepare your domain infrastructure for success, review our companion guides on How Long Does DNS Propagation Take?, What Are Nameservers and How to Change Them, and How to Choose a Web Hosting Provider.

Put this guide to work

Check a domain before you commit.

Free availability, WHOIS, DNS, SSL, subdomain, and email checks in one place.

Check availability