Skip to main content
17 September 2026 · 4 min read

How to move your website to a new host without downtime

A step-by-step plan for moving files, databases, mail and DNS to a new host so that your visitors never notice the switch.

How to move your website to a new host without downtime

Moving a website to a new host sounds risky, but most downtime during a migration comes from forgotten details rather than from the move itself. Start with an inventory of everything the site depends on: web files and uploads, every database and its version, mailboxes and forwarders, cron jobs, PHP settings and extensions, and the full list of DNS records for the domain. That means not only the A record, but also MX, TXT records for SPF and DKIM, CNAMEs for subdomains and any verification entries. Export the zone file if your current provider allows it. Ten minutes spent on this list saves hours of guessing later.

A few days before the move, lower the TTL on the records you plan to change. TTL tells resolvers how long they may cache an answer; if it is set to 24 hours, some visitors will keep reaching the old server for a full day after you switch. Drop it to 300 seconds at least two full TTL periods in advance, so the old long-lived value has expired everywhere before migration day. Once the move is done and stable, raise it again. This single step is the difference between a switch that takes minutes and one that drags on over a whole weekend.

Next, copy the site to the new server and test it there before anyone else sees it. Whether the destination is shared hosting or a VPS, the steps are the same: upload the files, import a database dump, recreate database users and cron jobs, and match the PHP version the site was built for. To view the new copy under the real domain, add a line to the hosts file on your own computer that points the domain at the new IP address, while everyone else still reaches the old server. A temporary address works too. Click through key pages, log in to the admin panel, submit a form and read the error log.

Between the first copy and the final switch, the live site keeps changing: new orders, comments, form entries, uploads. There are two ways to handle this. For a brochure site or a blog, announce a short content freeze and ask editors not to publish during the window. For a shop or anything with user accounts, plan a final delta sync instead: put the old site into maintenance mode for a few minutes, take a fresh database dump, copy only the files that changed with a tool such as rsync, and import everything on the new server. The final database dump must be the very last thing you take before switching.

Now point the DNS records at the new IP address. Pointing DNS is not the same as transferring the domain: you can move the website today and leave the registration where it is, then move it later with a domain transfer once the new site has settled. Doing both at once only adds variables. Keep the old hosting account running for at least a few days after the switch. Resolvers with stale caches will still send some visitors there, and the old server is also your fallback if something unexpected appears. Cancel it only when its access logs show no more real traffic.

Mail is where most migrations go wrong. If mail stays with the old provider or a separate service, make sure the new zone still carries the correct MX, SPF and DKIM records, otherwise messages will bounce or land in spam without anyone noticing. If mailboxes move too, create them on the new server first, copy existing messages over IMAP with a sync tool such as imapsync, and run a second sync after the MX change to catch anything that arrived in between. SSL needs attention as well: a certificate usually cannot be issued for the new server until the domain points to it, so request it right after the switch and check for mixed-content warnings.

After the move, work through a short checklist: crawl the site for 404 errors, test every contact and checkout form, confirm that redirects from old URLs still work, check that analytics and tag scripts fire, and verify cron jobs and outgoing mail. If you would rather not do all of this by hand, WebHostFlow support migrates a site of any size for free, including the database and mail, and schedules the DNS switch with you so there is no visible downtime. On CMS hosting the site is also checked on a temporary address first, and every shared plan includes a free SSL certificate that renews automatically.