In short and in plain language
When your shop moves to a new server, it takes a while. During this time, the old and the new server both run. Both can take orders.
Without a plan, orders can get lost. Background tasks or payment messages can also run twice or go missing.
The article shows a careful process. This includes a test run and a short stop for new data. The old server stays in the monitoring until the end.
We plan the move with you as part of your maintenance contract.
On paper a server move looks like a single step: copy the data, change the DNS record, done. In the operation of a shop it is a period, not a point in time. Between the first database dump and the moment every visitor really arrives at the new server lie hours to days - and during that time two machines run the same application. The old one keeps accepting orders as long as resolvers hand out its address. Both run cron jobs unless someone has switched them off. Payment providers report incoming payments to whatever address they currently resolve. And when the old name servers disappear with the contract, resolvers may keep serving expired answers - the specification suggests 1 to 3 days (RFC 8767) for this grace period. Whoever moves only the DNS record does not move the orders of those days.
Key takeaways
- The TTL of the DNS records is not lowered on moving day but in advance: at least one week (Google Search Central) before, so that the old, long values have expired from the caches by the time of the switch.
- If the old name servers can no longer be reached, resolvers may keep serving expired answers. RFC 8767 suggests 1 to 3 days (RFC 8767) for this - the old server has to keep answering sensibly for that long.
- Between the first dump and the switch, orders are created only on the old server. An announced write freeze with a final sync closes that gap; without it they are missing in the new system.
- Cron jobs, queue workers and exports run on at most one machine at any time. Duplicate runs produce duplicate emails, duplicate exports to the ERP system and duplicate bookings.
- Mail and certificates depend on the address: the SPF record must take in the new address under the limit of 10 DNS lookups (RFC 7208), and the certificate must be valid on the new server before the switch.
- The old server is switched off only when its log shows no more traffic (Google Search Central). The move is signed off only after a test order that runs through without manual help.
Why a move costs orders
A shop is not a static website. It writes constantly: orders, baskets, customer accounts, stock levels, payment states, logs. Every copy of its database is out of date the moment it is finished. When a static site moves, this does not matter - whether a visitor reaches the old or the new machine, they see the same content. With a shop, exactly this question decides which database an order lands in. And as long as both machines are reachable and both accept orders, there are two truths that nobody merges.
The consequences rarely show on moving day itself. They surface days later: as a customer who can produce an order confirmation for which the system holds no order. As a payment the provider considers successful while the order in the new shop still says “open”. As a shipping label printed twice because the export ran on both servers. Anyone who plans the move purely as a DNS task will not see any of these errors coming. The DNS layer itself is covered in the article on DNS maintenance with DNSSEC and registrar lock; this one is about the application on top of it.
Four ways an order gets lost
What DNS really does during the switch
A DNS record carries a lifetime, the TTL. It tells every resolver how long it may cache the answer before it has to ask again. When the shop's address changes, visitors see the new address only once the cached old answer has expired. If the TTL is set to one day, some visitors can land on the old server for a whole day - and order there. That is why the TTL is lowered before the move, and with lead time: the lowering only takes effect once the old, long value has expired from the caches. Google Search Central advises lowering the TTL to a conservative low value of a few hours, at least one week (Google Search Central) before the move. Shortly before the switch the value may drop further; what matters is that the old value has expired by then.
But the TTL is not the whole story. RFC 8767 describes a method called serve-stale: if a resolver cannot reach the authoritative name servers, it may keep serving expired records instead of giving no answer at all. The specification suggests keeping such records for 1 to 3 days (RFC 8767) beyond their expiry and generally caps TTL values with a recommended maximum of 7 days (RFC 8767). A stale answer served this way carries a short TTL, with 30 seconds (RFC 8767) recommended. The resolver therefore asks again soon - but as long as the name servers stay silent, it gets the old answer again.
For the move this means: serve-stale becomes relevant exactly when the name servers change along with the server, for example because the old host manages the zone and deletes it when the contract ends, or its name servers no longer answer for the domain. Resolvers that still hold the old record in memory then keep serving it. So the old server has to stay reachable during that period and do something sensible. Anyone moving the zone to a new provider therefore leaves it in place at the old provider with the new records until the new delegation has arrived everywhere.
| Phase | What happens in DNS | What the old server must do |
|---|---|---|
| Lead time | The TTL drops, at least one week (Google Search Central) before the move | Keep working normally and accept orders |
| Write freeze | The records still point to the old server | Stop accepting orders, enable the final sync |
| Switch | The new address is published, old answers age out of the caches | Pass requests on to the new server |
| Run-out | With unreachable name servers, stale answers for up to 1 to 3 days (RFC 8767) after expiry | Keep forwarding, analyse the logs |
| Shutdown | Traffic on the old server has arrived at zero (Google Search Central) | Take the final backup, archive it, then switch off |
The table shows why a move has two ends. The front end is plannable and lies with the operator: TTL, date, write freeze. The back end lies with third-party resolvers in the networks of customers, payment providers and search engines. Whether a resolver uses serve-stale, how long it keeps stale records and whether it honours the TTL precisely is decided by its operator. The only thing that can be planned is that the old server reacts correctly during that time.
Database: first dump, write freeze, final sync
The database is the part of the move that loses orders when it is treated as a one-off copy. The robust procedure has three steps. The first dump runs days before the date, during normal operation: it fills the new server, serves as a dry run and measures how long export, transfer and import really take. With this data the new shop is played through - catalogue, search, basket, checkout in test mode, invoicing. Errors from this dry run cost nothing, because no customer sees the new server yet.
On moving day the write freeze follows. From that moment the old shop no longer accepts orders: checkout and customer account show a maintenance page, the catalogue can stay readable if desired. The back office is locked so that nobody changes prices, stock or orders in the background. Then the final sync runs: either a second full dump, if the dry run showed it is fast enough, or the transfer of all changes since the first dump. Which variant fits is decided by the duration measured in the dry run, not by hope. Before the write freeze, a verified backup belongs in place, as the backup service provides - it is the way back if the final sync fails.
The write freeze is the most expensive moment - and the cheapest protection
Files move along with the database: product images, uploaded documents, generated invoices and delivery notes. They too are transferred twice - once in full with the first dump, once as a difference during the write freeze. Otherwise an invoice generated after the first dump exists only on the old server. The same goes for sessions: if they are kept in files rather than in the database, customers lose their basket at the switch. That is not data loss in the strict sense, but an abandoned purchase that announcing the window can avoid. Finally, the search index and caches on the new server are rebuilt after the final sync so that catalogue and prices match the transferred state.
The old server after the switch
The most consequential mistake in the process is switching off immediately. It looks consistent: the data has been transferred, the DNS record points to the new server, so the old one is cancelled. In reality it is still reached afterwards by visitors whose resolvers have stored the old answer, plus notifications from service providers and requests from search engines. If it is switched off, those requests go nowhere. If it keeps running unchanged, it is worse: then it accepts orders that do not arrive in the new system.
The old server therefore takes on a new role after the switch. The cleanest is that of a forwarder: it passes every request on to the new server, so that visitors and providers arrive at the new application regardless of their resolver. Where that is not possible, it stays read-only: catalogue visible, checkout, customer account and notification paths locked, with a response that signals a temporary error. Google Search Central recommends watching the logs of both servers and switching off the old one only when traffic there has fallen to zero (Google Search Central).
Forwarding
The old server passes all requests on to the new one. Visitors with a stale DNS answer still land in the new application, and nothing is written into the old database any more.
Read-only
Where forwarding is not possible: database write-protected, checkout and customer account locked. The catalogue stays visible, orders are created only on the new server.
Logs on both sides
Access to the old server is analysed daily. It shows which resolvers, providers and search engines still use the old address.
Name servers and zone
If the DNS provider changes too, the zone stays in place at the old provider with the new records until the new delegation has arrived everywhere.
Certificate and access
Forwarding still needs a valid certificate on the old server. Administrative access there, by contrast, is locked immediately.
Shutdown criterion
Shutdown follows a measurable condition, not the calendar: no more traffic in the log, all notifications assigned, final backup archived.
The final backup of the old server goes into the archive before the machine is deleted. As a rule it is then the only evidence if, weeks later, an order turns up that is missing in the new system. With rented servers the contract usually ends on a fixed date; set the cancellation date so that enough run-out remains after the switch, rather than tying the moving date to the notice period. Anyone reorganising the responsibilities between host and maintenance at the same time will find the dividing line in the article Hosting provider vs. maintenance: who patches what.
Cron jobs, webhooks, mail and certificates
Along with the server, everything that runs on a schedule is copied: crontab entries, system timers, the shop system's scheduled tasks and the workers that process queues. After copying they are active on both machines - working against two databases or, worse, against the same external targets. The order export goes to the ERP system twice, the newsletter goes to the list twice, payment reconciliation runs twice. The rule is simple and easily lost in the pressure of a move: at any point in time, background tasks run on at most one machine. On the new server they stay off until the switch; on the old one they are stopped with the write freeze. How silent failures of such tasks can be detected is described in the article on cron jobs and background jobs in the shop.
Payment and shipping providers report status changes to a stored address. They resolve this name themselves, with their own resolvers and their own caches. If a notification reaches the old server and the server accepts it, the provider considers it delivered - but the payment state then sits in the old database. If the old server instead rejects it with an error, providers as a rule retry delivery according to their own rules. The forwarding from the previous section solves both. In addition, every stored notification address needs checking, as does every allowlisting by IP address: interfaces of ERP, shipping or marketplaces often accept requests only from known addresses, and the new server has a new one. How these interfaces are maintained is covered in the article on payment APIs and webhook failures.
Retries continue until the message is transmitted or the sender gives up; the give-up time generally needs to be at least 4-5 days.
For outgoing mail, the move shifts the sending address. If the shop sends order confirmations directly from the server, its new IP address must be in the domain's SPF record before the first mail goes out, and the DKIM key has to move too. The SPF record has a hard limit: evaluation may trigger at most 10 DNS lookups (RFC 7208), otherwise it ends in a permanent error. Anyone who simply adds another include entry for the move can exceed this limit and thereby make the check fail for every mail of the domain. If mailboxes are also hosted with the old provider, incoming mail follows the same logic as notifications: if the old mail server is unreachable, nothing is lost at first, because a sending server queues the mail and tries again later. RFC 5321 recommends an interval of at least 30 minutes (RFC 5321) between attempts and a give-up time of at least 4 to 5 days (RFC 5321). If the old server keeps accepting instead, the mail lands in the old mailbox and has to be collected there before it is deleted. More on deliverability is in the article on DMARC and shop email.
The certificate has to be valid on the new server before the first visitor reaches it. There is a trap in the process here: with the widely used HTTP check of the ACME procedure, the certificate authority fetches a validation file under the domain, and this request goes to port 80 (RFC 8555) of the server the domain currently points to - before the switch, that is the old one. A new certificate can be issued this way only after the switch, and until then the first visitors see a certificate warning. Three ways out: take over the existing certificate including its key, run the validation via a DNS record, or forward the validation path on the old server to the new one. After the move, automatic renewal runs only on the new server; how certificate management monitors this is part of ongoing maintenance.
#!/usr/bin/env bash
# Migration reconciliation: compare orders, cron jobs and DNS answers of both servers
set -euo pipefail
OLD="shop-old" # SSH alias of the old server
NEW="shop-new" # SSH alias of the new server
DOMAIN="shop.example"
TARGET_IP="203.0.113.20" # address of the new server
DUMP="2026-10-09 21:00:00" # time of the first dump
RESOLVERS="192.0.2.53 198.51.100.53" # resolvers whose answer is checked
# Adjust table and column names to the shop system
SQL="SELECT DISTINCT order_number FROM \`order\` WHERE created_at >= '${DUMP}' ORDER BY order_number;"
printf '%s\n' "$SQL" | ssh "$OLD" mysql -N shop | sort > orders-old.txt
printf '%s\n' "$SQL" | ssh "$NEW" mysql -N shop | sort > orders-new.txt
echo "Orders that exist only on the old server:"
comm -23 orders-old.txt orders-new.txt
for host in "$OLD" "$NEW"; do
active=$(ssh "$host" "crontab -l 2>/dev/null | grep -Ecv '^[[:space:]]*(#|$)'" || true)
echo "${host}: ${active:-0} active cron lines"
done
for r in $RESOLVERS; do
answer=$(dig +short @"$r" "$DOMAIN" A | tail -n1)
if [ "$answer" = "$TARGET_IP" ]; then state="new"; else state="OLD"; fi
echo "Resolver ${r}: ${answer:-no answer} (${state})"
done
The script answers the three questions that matter after the switch: are there orders that exist only on the old server? Are cron jobs still running twice anywhere? Which resolvers still hand out the old address? During the run-out it runs several times a day until the first list is empty, only one server reports active cron lines and all checked resolvers return the new address.
The moving runbook in seven steps
Inventory and date
Record everything that depends on the server: application, database, files, cron jobs, workers, mail sending, certificates, notification addresses and IP allowlists at partners. Put the date into the weakest sales period, not into a promotion week.
Lower the TTL
Lower the TTL of the affected records at least one week (Google Search Central) in advance. If the DNS provider changes too, prepare the zone at the new provider and plan the handover so that the old zone is kept until the end of the run-out.
First dump and dry run
Copy database and files, play through the new shop completely via a test access and measure the duration of export, transfer and import. The length of the write freeze follows from this measurement.
Write freeze
Lock checkout, customer account, back office and notification paths on the old server, stop cron jobs and workers there, take a verified backup.
Final sync and switch
Transfer the difference of database and files, compare the orders since the first dump on both sides, then change the DNS record and switch on the background tasks on the new server. The old server changes to forwarding.
Sign-off by test order
Immediately after the switch, a real order from the product page to the confirmation email, with payment notification, export and invoice. As long as it does not run through completely, the way back stays open.
Run-out and shutdown
Analyse the old server's logs daily and repeat the reconciliation. Switch off only when traffic has arrived at zero (Google Search Central) and the final backup is archived.
Record everything that depends on the server: application, database, files, cron jobs, workers, mail sending, certificates, notification addresses and IP allowlists at partners. Put the date into the weakest sales period, not into a promotion week.
Lower the TTL of the affected records at least one week (Google Search Central) in advance. If the DNS provider changes too, prepare the zone at the new provider and plan the handover so that the old zone is kept until the end of the run-out.
Copy database and files, play through the new shop completely via a test access and measure the duration of export, transfer and import. The length of the write freeze follows from this measurement.
Lock checkout, customer account, back office and notification paths on the old server, stop cron jobs and workers there, take a verified backup.
Transfer the difference of database and files, compare the orders since the first dump on both sides, then change the DNS record and switch on the background tasks on the new server. The old server changes to forwarding.
Immediately after the switch, a real order from the product page to the confirmation email, with payment notification, export and invoice. As long as it does not run through completely, the way back stays open.
Analyse the old server's logs daily and repeat the reconciliation. Switch off only when traffic has arrived at zero (Google Search Central) and the final backup is archived.
The order is not arbitrary. Lowering the TTL only on moving day extends the run-out by the old value. Switching on the cron jobs on the new server before the switch produces duplicate runs on an outdated data set. And cutting the write freeze turns the final sync into a search without a clear end. The test order deliberately comes after the switch: before it, payment notifications still reach the old server, so a test via a local address entry checks only half the path.
Sign-off: how to recognise a successful move
A move is complete when this can be demonstrated, not when the home page loads. The home page also loads when the checkout points to an outdated interface, the order export is not running and the confirmation emails land in the spam folder. Sign-off therefore checks the paths on which revenue is created and the places where it can get lost.
- Test order played through from the product page to the confirmation email, with a real payment method.
- Payment notification arrived in the new system: the test order shows “paid” without anyone stepping in.
- Order export to ERP or shipping triggered exactly once, stock booked exactly once.
- Confirmation email delivered, SPF and DKIM checks passed according to the mail headers.
- Orders since the first dump compared on both servers, no order exists only on the old server.
- Cron jobs and workers active only on the new server, demonstrably stopped on the old one.
- Certificate valid on the new server, automatic renewal set up there and triggered once.
- IP allowlists at partners and service providers switched to the new address.
- Monitoring of availability and checkout switched to the new server; the old one stays in monitoring until it is switched off.
- Final backup of the old server created, restored once and archived.
The test order is the most important item on the list because it touches almost all the others. It shows whether the payment notification reaches the right server, whether the export runs and whether the mail arrives. How the order path can then be monitored permanently is described in the article on checkout monitoring.
When a move needs support
For shop operators a move is rarely routine. In many shops it happens only every few years, usually triggered by a change of host, the end of a contract or an underlying platform that drops out of vendor maintenance. How the end of support for operating system and database can force such a change is described in the article on end of life in the server stack. Anyone who carries out the process only once learns its traps in an emergency.
Under a maintenance contract, support starts with an inventory that delivers exactly the information a move needs: servers, services, cron jobs, interfaces, certificates and access. How this inventory works is explained in the FAQ on onboarding an existing project. Whether the current hosting provider can stay is answered by the question Can I keep my hosting provider? - so a move is not a precondition for maintenance, but a frequent occasion for it.
No way back
A move without a verified backup and without a running old server has no way back if the new one fails after the switch.
Many interfaces
The more connections the shop serves - ERP, shipping, marketplaces, payments - the more notification addresses and allowlists move along.
Two environments
Different versions of operating system, scripting language or database turn the move into an update as well, with its own need for testing.
Large database
If a full dump takes longer than an acceptable write freeze, the final sync needs a differential procedure and one more dry run.
Peak season
A move during peak season shortens the possible write freeze and raises the damage of every order that lands in the wrong system.
Retention duties
Anyone who has to retain orders, invoices and payment data needs the final backup of the old server as a documented state.
For the switch window itself, availability outside business hours matters, because moves usually take place at night or at the weekend. Emergency support covers exactly this window if something reacts differently after the switch than it did in the dry run.
Sources and standards
Related Articles
Hosting provider or maintenance: who patches what
Where the hosting provider’s responsibility ends and maintenance begins: a matrix across every layer of the shop, questions to ask and clear handover points.
End of support under the shop: OS and database
Debian 11, MariaDB 10.6 and MySQL 8.0 dropped out of maintenance in 2026. How to inventory distribution, database and PHP and plan the upgrades with lead time.
When your CMS version leaves support: 2026/2027
TYPO3 v12 ends on 30 April 2026, Joomla 5.x on 13 October 2026, Drupal 10 on 9 December 2026. The end dates and the lead time a version jump needs.