How to migrate a WordPress site
Make a restorable copy, test it on the new host and switch the domain when the checks pass.
Make a recoverable copy
Confirm access to both hosting accounts, the database and DNS. Export the database and archive the site files, including uploads and wp-config.php. Check the archive and destination disk space and import limits. For a busy store, schedule a short order freeze and plan a final database copy.
Test on the destination
Import the database into a new database, upload the files, and set the new database credentials in wp-config.php. Preview against the destination without changing public DNS. Test login, media, permalinks, forms, outgoing mail and checkout if applicable. Compare the form and order records against the source.
Switch DNS and verify
Record current DNS values. Once the new copy is ready, switch the website records and preserve mail records. Verify the homepage, HTTPS, login and form delivery from an external connection. Keep the old host active until caches expire and delivery is stable.
Roll back if a check fails
Restore the prior website DNS records and confirm traffic returns to the old host. Before retrying, reconcile any orders, form entries or content saved on the new host to avoid data loss.
