Cutting Over Without Cutting Corners: A Zero-Downtime Playbook for Leaving Your Legacy Host
Photo by Photo by Albert Stoynov on Unsplash on Unsplash
Every year, thousands of American small businesses decide to leave their hosting provider behind. Maybe the renewal quote tripled. Maybe support tickets sit unanswered for days. Maybe the infrastructure simply can't keep up with growth. Whatever the reason, the decision is usually the easy part — the migration is where things get dangerous.
The good news: with proper planning, a move off a legacy host can be genuinely seamless. Users should never notice you left. Here's how teams get there.
Why Most Migrations Break
Downtime during a migration almost always traces back to one of three failures: DNS that points to the wrong place, a database that was still accepting writes during the copy, or a rollback plan that existed only in someone's head. None of these are exotic problems. All of them are preventable with sequencing.
Before touching anything, inventory your stack honestly. A typical US small-business setup — a WordPress site, a Node API, a Postgres database, email, and a handful of cron jobs — has more moving parts than most teams realize. List every domain, subdomain, certificate, background worker, and third-party integration. If it's not on the list, it won't be on the migration plan.
Phase One: Replicate Before You Move Anything
The core principle of zero-downtime migration is simple: run the old and new environments in parallel, and only cut over when the new one is proven.
Start by provisioning the new environment completely — servers, runtime versions, environment variables, TLS certificates. Then replicate your data.
- Postgres: Use logical replication to stream changes from your source database to the new one. This keeps the replica within seconds of production while your application keeps running.
- WordPress: Export the database and media library, import to the new host, then schedule a final delta sync shortly before cutover.
- Object storage and uploads: Sync with
rsyncor your provider's transfer tool, then re-sync to catch files added during the process.
Test the new environment thoroughly against a staging hostname. Not the live domain — a throwaway subdomain with a valid certificate. Click through every critical flow: checkout, login, form submissions, email delivery. A migration is the worst possible time to discover a broken SMTP integration.
Phase Two: The DNS Cutover
DNS is where zero-downtime migrations are won or lost. The mistake first-timers make is treating DNS as a switch you flip. It's really a dial you ease over.
Days before cutover, lower your DNS TTLs to 300 seconds or less. This means that when you do change records, the internet adapts within minutes instead of hours. Then, at cutover:
- Confirm your database replica is caught up (or pause writes briefly on the legacy host for the final sync — a seconds-long pause, not an outage).
- Update the A/AAAA and CNAME records to point at the new infrastructure.
- Keep the legacy environment running, untouched, for at least 48 to 72 hours. Cached DNS records around the world — and inside corporate networks notorious for ignoring TTLs — will still route some traffic to the old servers.
That last point is the one that trips people up. Legacy hosts don't go quiet the moment you update a record. Plan for both environments to be live simultaneously, and budget for the overlap.
Phase Three: Rollback — Write It Down Before You Need It
A rollback plan drafted during an incident is not a plan; it's a panic attack with documentation. Before cutover, write out exactly how you'd revert: which DNS records change, how you'd re-sync any data written to the new environment during the rollback window, and who makes the call.
Define your rollback triggers in advance. Examples worth adopting:
- Error rates on the new environment exceed the old baseline by any meaningful margin for more than 10 minutes.
- Checkout or signup conversion drops below a set threshold.
- Any data-integrity signal — duplicate orders, missing records, failed writes.
If you hit a trigger, revert DNS and re-sync the delta. It should take minutes, not hours, because you rehearsed it.
The Gotchas That Catch First-Timers
A few failures we see repeatedly among teams migrating to modern cloud infrastructure:
- Hardcoded IPs. Applications, cron jobs, and webhooks that reference an IP instead of a hostname will break silently after cutover. Search your codebase and partner integrations.
- Email deliverability. Update SPF, DKIM, and DMARC records to authorize your new sending infrastructure, or your invoices land in spam.
- Certificate surprises. Provision TLS on the new environment before cutover, including SANs for every subdomain.
- Time zones and cron. A job scheduled in the legacy host's local time may run at the wrong hour on a new server defaulting to UTC.
- Stale caches. Full-page caches and CDNs can serve old content after cutover. Purge deliberately, not hopefully.
The Checklist
Summarized, the sequence looks like this:
- Full inventory of domains, services, integrations, and jobs
- Provision and harden the new environment
- Replicate data with continuous sync (logical replication or delta exports)
- Validate on a staging hostname with real traffic patterns
- Lower DNS TTLs at least 48 hours ahead
- Final sync, then update DNS records
- Keep legacy infrastructure warm for 72 hours minimum
- Monitor error rates, conversions, and data integrity against pre-defined triggers
- Roll back on trigger, or decommission the legacy host after the observation window
Migrations reward patience disproportionately. Teams that rush the validation phase to hit an arbitrary date are the ones scheduling midnight maintenance windows. Teams that let replication run its course cut over on a Tuesday afternoon and nobody notices — which is exactly how it should feel.