A full migration is more than a database dump. It’s files + DB + config + routing + DNS.
⚠️ Test in staging first whenever possible.
Step overview
| Step | Action |
|---|---|
| 1 | Export database (--single-transaction if live-ish) |
| 2 | Sync files with rsync |
| 3 | Update wp-config.php |
| 4 | Update Apache vhost + docroot |
| 5 | Run WP-CLI search-replace |
| 6 | DNS cutover |
| 7 | Verify + monitor logs |
Example DB export
mysqldump --single-transaction -u <db_user> -p <database> > backup.sql
File sync example
rsync -avz /var/www/<site-root>/ user@webhost1:/var/www/<site-root>/
Related
- Migrating a WordPress database between servers — DB-only migration
- Changing WordPress site URL or hosting folder safely — URL and docroot
- Fixing redirect loops after WordPress migration or URL change — when redirects break after move