The naive WordPress migration ("copy files, upload, change DNS") loses new orders, comments and uploads made during the transfer. This guide keeps the old and new site in sync until you're ready, then cuts over with under 30 seconds of user-visible downtime. Destination: Hostiger Managed WordPress or a Hostiger VPS.
Preparation (24 hours before)
Lower TTL on the domain's A record
At your DNS provider, set the A record TTL to 300 seconds. This means old A record cached responses expire in 5 minutes instead of the default hour. Do this 24 hours before cutover so all resolvers see the new low TTL.
Provision the destination
Order the Hostiger VPS or WordPress plan. Install WordPress on it (see our install guide). Point a temporary subdomain like new.yourdomain.com at the new server's IP so you can access it during setup.
Step 1 — Sync files
On the source server:
tar czf /tmp/wp-files.tar.gz -C /var/www/example.com .
scp /tmp/wp-files.tar.gz user@newserver:/tmp/
On destination:
rm -rf /var/www/example.com/*
tar xzf /tmp/wp-files.tar.gz -C /var/www/example.com/
chown -R www-data:www-data /var/www/example.com
Step 2 — Sync the database
On source:
mysqldump --single-transaction wp_site > /tmp/wp.sql
scp /tmp/wp.sql user@newserver:/tmp/
On destination:
mysql -e "CREATE DATABASE wp_site; CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'newpass'; GRANT ALL ON wp_site.* TO 'wpuser'@'localhost';"
mysql wp_site < /tmp/wp.sql
Step 3 — Update wp-config.php on destination
Match the new database credentials. Do NOT change the WordPress URL yet — leave it pointing at the original domain.
Step 4 — Test the new site via /etc/hosts
On your local machine, edit /etc/hosts:
NEW_SERVER_IP example.com www.example.com
Restart your browser. Visit https://example.com — you'll see the new server, but everyone else still sees the old one. Test:
- Homepage loads
- Login works
- Post edit + save works
- Image uploads work
- Contact form sends
- WooCommerce checkout completes (if applicable)
Fix any broken plugins/permissions issues before proceeding.
Step 5 — Final incremental sync (right before cutover)
Any new posts/uploads/orders happened on the OLD server during your testing. Do a delta sync 10 minutes before cutover:
# On source
rsync -av --delete /var/www/example.com/wp-content/uploads/ user@newserver:/var/www/example.com/wp-content/uploads/
mysqldump --single-transaction wp_site > /tmp/wp.sql
scp /tmp/wp.sql user@newserver:/tmp/
# On destination
mysql wp_site < /tmp/wp.sql
Step 6 — DNS cutover
Update the A record at your DNS provider to point to the new server IP. Because you lowered TTL to 300 in preparation, propagation completes in 5 minutes for most users.
Step 7 — Verify and restore TTL
- Watch traffic on both servers (
tail -f /var/log/nginx/access.log) - Once new server sees the traffic, put the old server into read-only mode
- Wait 24 hours to be sure DNS caches everywhere have updated
- Raise TTL back to 3600
- Cancel the old subscription
Common gotchas
- Absolute URLs in database — if you changed domains, use
wp search-replacefrom wp-cli to fix them. Never edit MySQL directly for serialized data. - SSL cert on new server — issue Let's Encrypt BEFORE cutover so HTTPS works instantly (see our Let's Encrypt guide).
- Cache plugin still cached the old wp-config — flush all cache after migration.
- Cron jobs — WordPress uses wp-cron by default; switch to real cron (
* * * * * curl -s https://example.com/wp-cron.php >/dev/null) for reliability.
Hostiger also offers free one-click WordPress migration for Managed WordPress plans — the Hostiger team handles the entire migration for you at no cost.