Move a site to a new domain
Move a site workflow:
- Delete existing domain mappings for the site.
wp search replace $old_url $new_url --all-tables; wp cache flush
, avoiding trailing slashes.wp rewrite flush --url=$new_url; wp rewrite flush;
- Verify site loads and login works.
- re-add domain.
- restart browsers because of cached redirects.