A production migration does not become safe because it happens after midnight. It becomes safe when every reversible action has been rehearsed, every irreversible action has an explicit gate, and the people watching the cutover know exactly what would make them stop.

The familiar bad migration has a simple shape. Files and a database are copied, the new environment renders a home page, DNS is changed, and only then does the team discover a missing runtime extension, an unwritable directory, a scheduled task that never moved, or an integration pinned to the old address. At that point users are reaching two places and the fastest route back depends on caches outside the team's control.

The difficult part is not copying the platform. It is managing state and proving the destination before real traffic depends on it. That distinction is the basis of a migration plan that can credibly aim for no user-visible downtime.

State is anything the system remembers that changes as people use it: database records, uploaded files, logged-in sessions, queued messages, and the record of which scheduled jobs have already run. Code and configuration can be copied as often as you like. State can be authoritative in only one place at a time, and most of a migration plan is about deciding exactly when that place changes.

The sections below follow the order the work happens in. If you own or manage the organization rather than run its servers, you do not need to type the commands, but you should expect to see the evidence each step produces before you agree to the next one.

Define what no downtime means

Before choosing tools, define the promise. A read-only marketing site, a transactional application, and a platform with long-lived sessions have different cutover problems. For one, continuous page delivery may be enough. For another, losing a submitted order or processing a job twice is an outage even if every health check remained green.

Write down the service-level objective for the change:

  • Which user journeys must remain available?
  • Can writes be paused, and for how long?
  • What maximum age of data is acceptable at the destination?
  • Must existing sessions survive?
  • Which background jobs, webhooks, and queues must run exactly once?
  • How will the team distinguish a slow response from a failed request?

Contingency planning already has words for two of these questions. NIST defines the recovery point objective as "the point in time to which data must be recovered after an outage," and the recovery time objective as the overall length of time a system's components can be in recovery before the organization's mission is affected. In a migration, the first becomes how much recent data could be lost or re-entered if the move had to be reversed, which for orders, payments and uploaded documents should normally be zero. The second becomes how long a pause your users will accept.

Google's Site Reliability Engineering book describes a service level objective as a target value for a service level that is measured by an indicator, and it says Google generally prefers percentiles to averages. Its example is a system where a typical request takes about 50 milliseconds while 5 percent of requests are 20 times slower, a tail that an average hides. Write migration targets the same way, for example that the 95th-percentile page time for a client portal stays under one second and fewer than one request in a thousand fails.

A written promise for a small organization can be a few sentences. For an online store, it might say that the catalog stays browsable throughout, that checkout pauses for no more than 15 minutes starting at 6:00 a.m. on a Sunday with a banner posted the day before, that no order placed before the pause is lost, and that each order confirmation email is sent exactly once. Each clause tells the technical team what to test and tells everyone else what to expect.

Sometimes the honest plan includes a short maintenance window. That is better than calling a write freeze zero downtime and surprising people. The goal is not a heroic claim; it is a controlled transition whose effect has been agreed in advance.

A short window is usually the right answer when there is a quiet period, writes can be paused without stranding anyone mid-task, and the rehearsal shows that the final synchronization fits comfortably inside the pause. It stops being acceptable when customers, devices or other systems write around the clock, or when the data that changes during the pause is too large to move in the time users will tolerate. Those cases call for replication or a staged traffic shift, which take more engineering time and more testing.

Inventory the whole system, not just the server

A migration assessment should describe the platform as a dependency map. Record runtime and point versions, loaded modules, services, package sources, database engines and collations, local files, object storage, secrets, certificates, mail routing, scheduled work, queues, firewall rules, allow-listed addresses, DNS records, monitoring, backups, and third-party integrations. Include who owns each dependency and how it will be tested.

A spreadsheet is enough. Give each item a row showing where it lives today, how it will move, who owns it, how it will be tested, and its status. The owner column matters most, because a dependency with no owner is one that nobody tests and nobody notices failing.

Look specifically for state hiding in unexpected places. Uploads may sit on a local disk while application code lives in a repository. A cache may actually contain durable sessions. A plugin may register work in its own scheduler.

An outbound mail relay may trust the old source address. A partner may have hard-coded an IP. A certificate renewal job may exist only on the source host. These are ordinary arrangements, but they do not appear in a simple file-and-database copy.

Hidden state and dependencies usually turn up in these places:

  • Scheduled work in every user's crontab, the system cron directories, systemd timers, and any scheduler inside the application.
  • Sessions stored on local disk, which is PHP's default session storage.
  • Mail sent by the server itself, including password resets, form notifications, and copiers or scanners that relay through it.
  • Inbound webhooks from payment processors, accounting systems, and booking or form services.
  • Allow-list entries at banks, partners and vendors that name the old address.
  • Certificates, their private keys, and whatever job renews them.
  • Backup jobs, especially those that run on the old host and stop covering the data once it moves.
  • DNS records beyond the website, such as mail, verification and service records.

Sessions are a good example of state nobody lists. The PHP manual gives files as the default session handler, with session data written to a directory on the server. An application that relies on PHP's built-in sessions therefore leaves its users' sessions behind on the old machine unless they are moved to shared storage first. Either make that move or accept, and announce, that users will need to sign in again.

Schedulers are another. The WordPress Plugin Handbook explains that WP-Cron checks for due tasks on page loads instead of running continuously. Any copy of a WordPress site that receives requests, including a rehearsal copy opened by a tester, can therefore run scheduled tasks such as sending reminder emails or syncing orders. The handbook documents the wp-config.php line define( 'DISABLE_WP_CRON', true ); for handing the job to the system scheduler, and on a rehearsal copy with no system scheduler the same line stops page loads from triggering scheduled tasks.

Check the operating system as well as the application. On a Linux server, crontab -u deploy -l prints the scheduled jobs of an account named deploy, and systemctl list-timers lists systemd timers in the order they will next run. Repeat the first command for every account that could own a job, and look in /etc/crontab and the /etc/cron.* directories too. Certbot's documentation points to the same places to find its own renewal task, which is exactly the kind of job that gets left behind.

Mail needs its own check. Google's email sender guidelines require everyone sending to Gmail accounts to set up SPF or DKIM and to have valid forward and reverse DNS records, also called PTR records, for their sending domains or IP addresses. The reverse record must name a host whose own address record points back to the same sending address. If the server that sends mail gets a new address, update the SPF record and ask the provider that assigned the address to set its reverse DNS before the first message leaves from it; dig -x followed by the new address shows the reverse name currently published for it.

Capture a performance baseline as well: request rate, error rate, latency at representative percentiles, queue depth, database connections, CPU, memory, disk throughput, and the duration of key jobs. Without a baseline, the new platform can be materially worse while still looking technically alive. Cover a full business cycle, at least a week and through month-end if billing runs then.

The comparison after cutover should be against the same kind of day. Google's Site Reliability Workbook warns that before-and-after comparisons are hard to read because time is one of the biggest sources of change in the numbers, and its example is a change made on a Monday being judged against weekend behavior. If all traffic moves at once, before and after is the only comparison available, so compare a Saturday with earlier Saturdays and month-end with month-end.

Build the destination repeatably

The destination should be created from versioned configuration wherever practical: infrastructure definitions, configuration management, container manifests, or at minimum a reviewed build script. Record the image versions and configuration inputs. Keep secrets out of the repository and inject them through the chosen secret store.

Repeatability is not an aesthetic preference. The first build almost always exposes omissions. If an engineer fixes each omission manually on the candidate host, the team has proved that one person can improvise, not that the environment can be recovered. Apply each fix to the build process, destroy the candidate, and build it again. A clean second run is evidence.

Make deployment idempotent. Re-running it should converge on the intended state rather than creating duplicate users, repeated scheduler entries, or a second copy of a job. The difference lies in how each step is written: "add this line to the scheduler" creates another copy every time it runs, while "make sure the scheduler contains exactly this line" does not. Validate configuration before starting services, and fail closed when a required secret or dependency is absent. A half-configured process returning a friendly default page is more dangerous than a clear deployment failure.

Build the unglamorous parts in from the start: clock synchronization and time zone, log rotation, the firewall, monitoring agents, the backup job, and certificate renewal. They are easy to defer until after launch, which is exactly when they are needed.

Rebuilding has one side effect worth planning for. If every build requests a new certificate from Let's Encrypt, repeated rebuilds can run into its rate limits, which allow up to five certificates for the same exact set of names every seven days and up to five authorization failures per name, per account, per hour. Let's Encrypt lists deleting the ACME client's configuration data on every deployment as a common way to hit the first limit, and recommends its staging environment, which has significantly higher limits, for testing. Switch to production certificates for the final build.

Rehearse with representative data

Take an initial copy while the source remains authoritative. Restore it into an isolated destination and bring the application up through a temporary hostname or a local host-file override. Keep search indexing, outbound messaging, payment calls, and partner webhooks disabled or redirected in the rehearsal environment so a test does not create real-world effects.

Make the copy consistent by using the database engine's own export tools. MySQL's mysqldump has a --single-transaction option that, for InnoDB tables, dumps the database as it stood when the dump began without blocking applications. The manual warns that MyISAM and MEMORY tables can still change during such a dump, and that no other connection should run ALTER, CREATE, DROP, RENAME or TRUNCATE TABLE while it is in progress.

PostgreSQL's pg_dump makes consistent exports while the database is in use and does not block readers or writers. It exports one database at a time, though, so roles and tablespaces have to be exported separately, which is what pg_dumpall --globals-only does.

For files, rsync is the usual tool because later runs send only the differences. Its archive mode keeps permissions and timestamps, but it sets file ownership only when the receiving side runs with super-user rights, and it does not copy ACLs, extended attributes or hard links unless asked to. Its --delete option removes destination files that no longer exist on the source. The rsync manual describes that option as dangerous when misused and recommends a --dry-run first to see what would be deleted.

Time everything. The first full copy may take hours, but the numbers that matter come later: how long a repeat file sync takes after a day of normal changes, and how long the database export and import take. Their sum, plus your verification checks, is the real length of any write freeze. If the rehearsal needed 40 minutes, a 15-minute promise is not a plan.

The most convincing test uses the real name, because redirects, cookies, generated links and certificates all depend on it. A hosts-file entry on one test computer sends that computer to the new server while everyone else still reaches the old one. Microsoft's documentation for the PowerToys Hosts File Editor describes exactly this use, previewing a website on a new hosting provider, and notes that the editor must run as administrator to change the file.

On Windows the hosts file is typically in C:\Windows\System32\drivers\etc. From a command line, curl's --resolve option, for example --resolve example.com:443:203.0.113.10, sends a single request for the real name to a chosen address without touching the hosts file.

Remove test entries when testing ends. A forgotten entry keeps that computer on the rehearsal copy, where real work can be entered and then overwritten by the final sync, and after a rollback it keeps that computer on the wrong server.

Prove which server answered. Place a small marker file on the destination only and confirm that the test browser can load it. A test that passes against the old server looks exactly like a test that passes against the new one.

Test more than the home page. Exercise anonymous and authenticated journeys, reads and writes, uploads and downloads, search, administration, password reset, mail delivery, API calls, webhook receipt, scheduled work, queue consumption, error pages, and any high-value business transaction. Compare record counts and selected checksums where they are meaningful. Confirm character encoding, time zones, generated URLs, file ownership, and database grants.

MySQL's CHECKSUM TABLE statement exists to confirm that a table's contents are the same before and after an operation, but it holds a read lock while it runs and its value depends on the table's row format, so compare like with like and run it on a quiet copy. Check some records by hand as well: the newest order, a customer name with accented characters, the longest text field, and a record that stores a link.

Time zones do quiet damage. The MySQL manual explains that TIMESTAMP values are converted from the current time zone to UTC for storage and back again on retrieval, while DATETIME values are not converted, and that each connection uses the server's time zone unless it sets its own. mysqldump's --tz-utc option, which is on by default, moves TIMESTAMP values between servers in different time zones without changing them. The trouble comes afterward: if the application relies on the server's default and the destination's time zone setting differs from the source's, the same stored value comes back as a different time. Compare a known appointment or order time on both systems.

Serialized or encoded application data needs application-aware transformation. A blind text replacement can alter length metadata or user content. Use the platform's supported migration mechanism and test records that include non-ASCII characters, long values, and embedded URLs. For WordPress, the WP-CLI search-replace command handles PHP serialized data, has a --dry-run option that reports changes without saving them, and can --export the result to a SQL file instead of changing the database.

If you keep the rehearsal copy out of search results with a noindex instruction, or with the WordPress setting Discourage search engines from indexing this site, which adds a noindex, nofollow robots tag to the site's pages, put its removal on the cutover checklist. A launch that inherits that setting looks fine to visitors while search engines are being asked not to index the site.

Run a modest load test or replay sanitized representative requests if the environment permits it. Watch application, proxy, database, and system logs directly. A destination that passes functional tests at one request per minute may still exhaust workers, connections, or memory under normal traffic.

Choose a state-transfer strategy

Static content can be copied repeatedly with a final delta. Mutable platforms require a deliberate write strategy. Common patterns include:

  • A brief write freeze, followed by a final database and file delta. This is simple and defensible when the business can tolerate a clearly communicated pause.
  • Database replication from source to destination, with lag monitored until cutover. This reduces the final gap but introduces engine-specific promotion and consistency work.
  • Dual writing through application logic or an event stream. This can support complex transitions, but it adds a new failure mode and should not be introduced casually for a one-off move.
  • Blue-green operation against a shared durable data layer. This works when both application versions are schema-compatible and the shared layer is not itself being moved.

Pick one and document its invariants. If replication is used, define acceptable lag, how promotion occurs, and whether any path can still write to the old primary afterward. If a freeze is used, define how writes are blocked, what users see, how queued submissions are handled, and who verifies the final synchronization.

When the business can tolerate a short pause, the freeze is the simplest strategy to rehearse and verify. Replication earns its complexity when the measured final sync will not fit inside a pause users accept, or when writes never stop. Dual writing belongs to platforms that are changing their data model as well as their location. Blue-green is the natural fit when only the application servers move and the database stays where it is.

Block writes where they happen, not where they are displayed. Hiding an upload button does not stop a mobile app, an API client or a background import from writing. Use the application's maintenance mode, remove write permission at the database, or stop the services that accept writes, then confirm with a test write that the block holds.

Replication has engine-specific traps that a rehearsal should expose. MySQL reports lag in the Seconds_Behind_Source field of SHOW REPLICA STATUS, but its manual says the figure is a good approximation only on fast networks and can show zero while the replica is still behind. A practical check is to write a marker row on the source and confirm it arrives at the destination.

In PostgreSQL 18, the current release, logical replication does not copy schema changes, sequence values or large objects. Its documentation notes that sequences on the receiving side still show their starting values, so they must be advanced before a switchover, or the first new record on the destination can collide with an existing one.

Schema changes deserve special care. Prefer backward-compatible expand-and-contract changes: add new structures first, deploy code that can work with old and new, migrate data, then remove old structures later. A destructive schema migration coupled to the traffic switch makes rollback theoretical because the old application may no longer understand its database.

A small example shows the sequence. To rename a phone column to mobile_phone, add the new column, deploy code that writes to both and reads the new one with a fallback, copy the existing values across, switch reads to the new column, and drop the old column only after the fallback period. At every step before the last one, the previous version of the application still works against the database.

Prepare DNS and traffic control

Lower relevant DNS time-to-live values well before the change, far enough ahead for the previous values to expire. Verify the authoritative answer from more than one resolver. Inventory aliases, IPv4 and IPv6 records, mail-related records, validation records, and any content-delivery or web-application-firewall configuration. Changing only the obvious A record can leave part of the audience on the old path.

The timing is arithmetic. A record's TTL is the number of seconds resolvers may cache it, so a resolver that looked up the name just before you lowered the TTL can keep the old answer for the whole of the old TTL. If the current TTL is 86,400 seconds, which is one day, lower it at least a day before the change; two days leaves time to check. Google Public DNS says it generally caches records for no more than six hours even when the TTL is longer, but you cannot count on every resolver doing the same.

Check what the world sees, not what the DNS dashboard says. From a command line, dig +noall +answer example.com prints just the name, type, TTL and value of each answer, and adding @ followed by your DNS provider's name server asks that authoritative server directly. On Windows, nslookup example.com 1.1.1.1 asks a specific public resolver, and nslookup -type=AAAA example.com checks the IPv6 record. Google's Admin Toolbox also has a browser-based Dig page for people who would rather not use a command line, and if Google Public DNS is still serving the old answer after the change, its Flush Cache tool can refresh common record types for a name.

An AAAA record left pointing at the old server can send visitors who have IPv6 connections there no matter what the A record says. Check every record type the name has, not just the one you changed.

If the domain's DNS is on Cloudflare, a DNS-only record's TTL can be set anywhere from 60 seconds (30 seconds on Enterprise plans) to one day. Proxied records are answered with Cloudflare's anycast addresses instead of the origin server's address, and their TTL is fixed at Auto, which is 300 seconds. For a proxied record, then, the address that visitors' resolvers cache is Cloudflare's, not your server's. Cloudflare also notes that a local DNS cache can take longer than five minutes to show a change.

Two less obvious caching rules matter. Under RFC 2308, a resolver that asks for a name before it exists can cache the negative answer for the smaller of the SOA record's minimum field and the SOA record's own TTL, so create new or temporary hostnames before anyone tries them. Under RFC 8767, resolvers may keep serving expired answers when they cannot reach a domain's authoritative servers, with a suggested limit of one to three days. If DNS hosting itself is moving, keep the old provider answering correctly until the change has settled.

A low TTL reduces how long many resolvers retain an answer; it does not guarantee instant propagation or provide rollback by itself. Existing connections, recursive resolver behavior, browser caches, proxies, and hard-coded addresses can keep traffic on the source. If a load balancer, reverse proxy, or CDN can shift traffic between healthy origins, use that controlled layer rather than relying solely on DNS.

Some traffic layers can also move traffic gradually. Amazon Route 53's weighted routing divides traffic according to record weights; its documentation gives weights of 1 and 255 as a way to send 1/256 of the traffic to one resource, and a weight of 0 stops traffic to a record. Weighting done in DNS is still subject to caching, so treat the shares as approximate.

Issue and validate the destination certificate before cutover. Check the complete chain, supported names, renewal method, and the behavior of HTTP-to-HTTPS redirects. Confirm that health checks reach a dependency-aware endpoint, not a static file that remains green while the database is unreachable.

The validation method decides when the certificate can be issued. Let's Encrypt's HTTP-01 challenge places a file under /.well-known/acme-challenge/ on the domain and can only be done on port 80, so while the name still points at the old server, the validation request arrives at the old server. Let's Encrypt follows redirects during this check, so the old server can be set to redirect challenge requests to the new one, but on its own HTTP-01 cannot validate the destination before cutover.

The DNS-01 challenge uses a TXT record at _acme-challenge instead, and Let's Encrypt notes that it can validate names whose web servers are not exposed to the public internet, which covers a destination that is not yet receiving the domain's traffic. It is practical when the DNS provider has an API for automated updates, and Let's Encrypt warns that full DNS API credentials kept on the web server raise the stakes if that server is compromised. Certbot users can test the renewal path with certbot renew --dry-run, which runs against the Let's Encrypt staging server and does not save the test certificates.

Certificates matter even more on sites that send the Strict-Transport-Security header, known as HSTS. Browsers that have seen it use only HTTPS for that host, and MDN Web Docs notes that when an HSTS host presents an invalid certificate, the browser offers no way to click through the warning. A certificate mistake at cutover becomes a hard outage for returning visitors.

Write the cutover runbook

The runbook turns the plan into an ordered list that someone other than its author could follow. Each step names an owner, the exact action, the expected result, how long it took in rehearsal, and what to do if the result is wrong. Rehearse from the runbook itself, not from memory, and correct it whenever reality differs.

A write-freeze cutover usually runs in this order:

  • Confirm the go decision and open the change call or channel.
  • Turn on the maintenance notice and block writes at the application or database.
  • Stop schedulers and queue consumers on the source.
  • Run the final file delta and database export, then import at the destination.
  • Run the verification checks against the destination before any public traffic moves.
  • Change DNS or the proxy origin, and record the exact time.
  • Start schedulers and queue consumers on the destination only.
  • Lift the write block and run the first-hour checks.
  • Keep the source running, read-only, for the agreed fallback period.

Mark the step after which rollback changes shape. Until writes reopen at the destination, going back is a traffic change. After that, every minute adds data that exists only on the new platform.

Set the human gate

Everything before the traffic change should be safe to repeat. The switch itself needs a named change owner and an explicit go or no-go review. At the gate, confirm:

  • The destination build and data synchronization completed successfully.
  • Functional, performance, security, backup, and restore checks passed.
  • Replication lag or the final write-freeze state is within the agreed boundary.
  • Monitoring, logging, paging, and external probes are active.
  • The rollback decision, commands, credentials, and approver are available.
  • Client, support, and engineering contacts know the change is beginning.
  • No unrelated incident or dependency degradation makes the result hard to interpret.

Require a person to confirm the exact production target. Automation is valuable up to this boundary, but an unattended system should not decide that weak evidence is good enough to redirect users. The gate is also where schedule pressure gets one last chance to lose to evidence.

The review can take ten minutes. The change owner reads each line, and the person responsible answers with evidence, such as a test result, a screenshot or a log entry, rather than a yes. Someone who can speak for the business should attend, because a no-go is a business decision as much as a technical one. Rollback credentials count as available when someone has tested them that day, not when someone remembers where they are stored.

Tell people before, during and after

Most of the people affected by a migration are not on the project. Tell them in advance what will change, when, what they will notice, and how to report something that looks wrong. A week's notice is reasonable for a planned pause, with a reminder the day before.

The usual audiences are:

  • Staff, including whoever answers the phone when customers report problems.
  • Customers or clients who use the system, through a banner and an email if writes will pause.
  • Vendors and partners who send data to the system or allow-list its address.
  • Payment, accounting and booking providers whose webhooks or settings name the old server.
  • The support desk, which needs a summary of the runbook and the rollback criteria.

Send a short confirmation when the change is complete, and say what to do if anything still seems to reach the old system. A problem reported on the first day is easier to trace while both systems and their logs are still available.

Observe the cutover as an experiment

Shift a small share of traffic first when the architecture allows it. Compare destination and source error rates, latency, resource use, and business-level outcomes. Then increase in controlled steps. If traffic can only move at once, use synthetic checks from outside the network and keep both source and destination logs visible side by side.

Google's Site Reliability Workbook describes canarying as a partial and time-limited deployment of a change and its evaluation. Its guidance carries over to migrations: the canary should be large enough and run long enough to be representative, its signals should be compared with the control, meaning the part of the service that has not changed, and it should also be judged against absolute targets such as the agreed objectives. The workbook strongly advises running only one canary at a time.

For the first hour, verify actual transactions rather than dashboards alone. Confirm a new record can be created and read back, a file can be uploaded and retrieved, a message reaches its destination, a scheduled task completes, and queue depth behaves normally. Watch the old origin for continued requests; they may reveal stale resolution, forgotten integrations, or an address embedded in a device.

The old server's access log is the best list of what the inventory missed. Look at which clients are still arriving and what they request. A trickle that fades soon after the change is normal caching and open connections. A source that keeps arriving long afterward is usually a partner, a device or a hard-coded address that belongs in the inventory.

Protect against double processing. Only one scheduler or queue consumer set should own production work unless the system was designed for concurrent consumers with idempotent jobs. Replaying a payment, email campaign, or inventory update can be more damaging than a short outage. Treat disabling cron entries, timers and application schedulers on the source, WP-Cron included, as a runbook step rather than a cleanup task.

Know when to roll back

Rollback criteria must be measurable and agreed before cutover. Examples include sustained elevated error rate, a failed critical journey, replication inconsistency, unbounded queue growth, or latency beyond the stated threshold for a defined interval. Avoid the phrase roll back if nobody has specified what it entails.

Write each criterion so that two people looking at the same graph would reach the same decision. An error rate above 1 percent of requests for five consecutive minutes is a criterion; errors look high is not. Name who decides, how long they wait for a fix before deciding, and the time after which the plan switches from rolling back to fixing forward.

Traffic rollback is only safe while state remains compatible. If users have written data to the new platform, sending them back to an unchanged old database may split the record of truth. The recovery plan may instead be to keep traffic at the destination and correct forward, or to replicate new writes back before reversing. Test the chosen path in rehearsal.

Do not decommission the source on launch day. Restrict administrative changes, preserve logs, maintain necessary replication or backups, and keep it available for the agreed fallback period. Then prove that no legitimate traffic or scheduled work remains, export the final evidence, revoke temporary access, remove obsolete DNS and firewall entries, rotate migration credentials, and destroy retained data according to policy.

The operational definition of done

A migration is complete when the new platform is stable, monitored, recoverable, documented, and owned, not when DNS first returns a new address. Update diagrams, inventories, runbooks, backup scope, on-call notes, vendor allow lists, and cost monitoring. Restore normal TTL values. Record what differed from rehearsal and turn every manual discovery into an improvement to the process.

Restoring TTLs is more than tidying up. Cloudflare's documentation describes the trade-off: a longer TTL makes cached answers more likely and lookups faster, but makes changes slower to take effect, which is the right balance once the move is over. Run one real restore from the new platform's backups before closing the project, because a backup job still aimed at the old server is an easy gap to miss.

A worked example with illustrative numbers

Imagine a twelve-person architecture firm whose WordPress site includes a client portal where clients upload drawings. Everything runs on one aging virtual server: a MySQL database of about 3 GB, 80 GB of uploads, a portal plugin that keeps sessions in PHP's default file storage, a reminder email that WP-Cron sends each morning, and an office copier that sends scans through the server's mail relay. The firm is moving the site to a new managed host. The figures here are invented for illustration.

The promise fits in a paragraph. Public pages stay up throughout. Client uploads pause for at most 45 minutes from 7:00 a.m. on a Saturday, announced on the portal and by email a week ahead. No upload accepted before the pause is lost, and the morning reminder runs once.

The inventory finds what a file copy would have missed. The copier is set to send through the old server by IP address. The accounting system posts payment notices to a webhook on the portal. The website record has a TTL of 14,400 seconds, or four hours, and the certificate renews through HTTP-01 on the old server.

The first rehearsal copies the uploads in about five hours. A repeat sync the next day takes four minutes, and the database export and import take nine. Testing under the real name through a hosts-file entry turns up two defects: thumbnails fail because an image library extension is missing, and appointment times are off by several hours because the new database server runs on UTC and the portal stores those times as TIMESTAMP values. Both fixes go into the build script, the server is rebuilt, and the second rehearsal is clean.

The decisions follow from the evidence. A write freeze is enough, because the measured final sync and import take 13 minutes, which leaves room for checks and the gate review inside the 45-minute promise. Clients will have to sign in again, and the notice says so. The destination certificate is issued a week early through DNS-01, and the TTL drops to 300 seconds two days ahead. The copier is repointed to the new relay, SPF and reverse DNS for the new sending address are set up in advance, and the accounting vendor confirms its webhook uses the hostname rather than the old address.

On the day, the upload form closes at 7:00 and WP-Cron is switched off on the old server. The final sync and import finish by 7:16, the checks against the destination pass, and the gate review approves the switch at 7:24. DNS changes at 7:26. The team removes the DISABLE_WP_CRON line that has kept the destination's scheduler quiet since the first rehearsal, confirms a test upload on the new server, and reopens the upload form there at 7:32. Visitors whose resolvers still hold the old address see the maintenance notice on the old server until that cached answer expires, normally within five minutes at a 300-second TTL.

The first-hour checks pass: a test drawing uploads, a password reset reaches a staff mailbox, and the copier delivers a scan. Requests to the old server fade within minutes, except from a website monitoring service someone set up years earlier against the server's IP address. It goes into the inventory and is repointed. The next morning's reminder goes out once, from the new server.

The rollback rule is simple. Until the upload form reopens on the new server, no data exists only there, so rollback means pointing DNS back and lifting the write block on the old server. After that, the plan is to fix forward, with a rehearsed reverse sync of new uploads as the fallback. Two weeks later the old server shows no legitimate traffic, its final backup is archived, it is destroyed under the firm's retention policy, and the TTL goes back to 14,400 seconds.

Common mistakes and how to spot them

Most migration failures are familiar, and each has a symptom you can look for:

  • Testing the old server by accident. The marker file that exists only on the destination does not load.
  • Lowering the TTL too late. A public resolver still reports a TTL larger than the new value, so its cached copy predates the change.
  • Leaving two schedulers running. Customers receive duplicate reminders or invoices the morning after cutover.
  • Forgetting the IPv6 record. Some visitors still reach the old site after the A record has changed.
  • Moving the mail sender without its DNS. Bounce messages mention SPF or reverse DNS for the new sending address.
  • Leaving the certificate renewal job behind. No certbot renew entry appears in the new server's crontab or in systemctl list-timers.
  • Trusting a health check that cannot fail. The check stays green when the database is stopped during rehearsal.
  • Running the final file sync before the write block. Files uploaded in the gap are missing at the destination.
  • Letting the time zone change. Appointment or order times on the new system are off by several hours.
  • Carrying the rehearsal noindex setting into production. The live pages' source still contains a robots meta tag with noindex.
  • Deleting the source on day one. Nothing is left to fall back to or to compare against.

What to do this week

If a migration is on your calendar, these steps cost little and make every later step easier:

  • Write the promise in plain sentences, covering what stays available, how long writes may pause, and what must happen exactly once.
  • Start the inventory, and list every outside party that sends data to the system or receives data from it.
  • Ask whoever manages DNS for the current TTL on your website and mail records.
  • Confirm that the organization, not only a contractor, holds owner-level access to the domain registrar, the DNS provider and the hosting accounts.
  • Ask when a backup of the system was last restored somewhere else and checked.
  • Pull a week of traffic data and choose the quietest realistic window.
  • Put the earliest decommission date on the calendar, well after the cutover.

The safest migrations are intentionally uneventful. They give the team many cheap attempts at building and testing, one deliberate decision to move traffic, and a recovery path that respects where the latest state lives. That is the work behind a cutover users never notice.

Where ALCO can help

ALCO's cloud migration service moves email, files, servers and websites to Google Workspace, Microsoft 365 or ALCO hosting. Each move is planned around what depends on what, rehearsed first, and cut over in a window the client approves, with the old system kept running until the client says so. WordPress and custom sites move to ALCO managed hosting behind Cloudflare Enterprise. The ALCO help desk is staffed 24 hours a day, including holidays, and calls are answered by a person.

Sources