Zero downtime is mostly preparation. The actual switch should be boring: lower TTLs, sync changes, test the new origin, update DNS, monitor, and keep a rollback path open until caches settle.
48 hours before the move
Lower DNS TTLs for records you will change:
dig A example.com +noall +answer
dig www.example.com +noall +answer
dig MX example.com +noall +answer
Set web records to 300 seconds or less if your DNS provider allows it. Do not change MX records unless email is part of the migration.
Inventory the current site
Capture:
- WordPress version, PHP version, database version
- Active theme and child theme
- Active plugins
- Uploads directory size
- Current DNS records
- Cron jobs
wp-config.phpconstants- Cache, CDN, and WAF settings
Useful commands:
wp core version
wp plugin list
wp theme list
wp option get siteurl
wp option get home
du -sh wp-content/uploads
Build the destination before the cutover
Install the target PHP version, database, Redis if used, SSL tooling, and backups. Do not wait until migration day to discover a missing PHP extension.
Common WordPress extensions:
curl, dom, exif, fileinfo, gd, imagick, intl, mbstring, mysqli, opcache, sodium, xml, zip
First sync
Copy files and database while the old site is live:
rsync -aH --numeric-ids old:/path/to/htdocs/ /path/to/new/htdocs/
wp db export /tmp/site.sql
wp db import /tmp/site.sql
Then adjust wp-config.php database credentials and test locally with a hosts file override.
Test with hosts file
Point your machine at the new server:
203.0.113.42 example.com www.example.com
Check:
- Homepage, login, admin dashboard
- Contact forms
- Search
- WooCommerce cart and checkout if relevant
- Image uploads
- Permalinks
- SSL certificate issuance
- Error logs
Freeze risky writes
For content-heavy sites, schedule a short editorial freeze. For WooCommerce or membership sites, use a maintenance banner or a final incremental sync window. True zero downtime for write-heavy WordPress requires database replication or application-aware migration tooling.
Final sync
Run a final file sync and database export/import:
rsync -aH --delete old:/path/to/htdocs/ /path/to/new/htdocs/
wp db export /tmp/final.sql
wp db import /tmp/final.sql
wp cache flush
If uploads changed during the database import, run a final uploads-only rsync.
Cut DNS
Change only the web records you planned:
A example.comA www.example.comorCNAME www- IPv6
AAAArecords if used
Leave email DNS alone unless the email migration is intentional.
Monitor after launch
For the first hour:
tail -f /var/log/nginx/access.log /var/log/nginx/error.log
journalctl -u php8.3-fpm -f
wp option get siteurl
wp cron event list
Use external checks from more than one network:
dig @1.1.1.1 example.com A
dig @8.8.8.8 example.com A
curl -I https://example.com/
Rollback plan
Rollback means changing DNS back and confirming the old site still works. Keep the old hosting online for at least 72 hours. Do not cancel it the moment the new site loads on your laptop.
Post-migration cleanup
After caches settle:
- Raise TTLs back to normal
- Confirm backups on the new host
- Remove hosts file overrides
- Update uptime monitoring
- Check Search Console and analytics
- Run a broken link scan
- Decommission the old server only after final sign-off