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;
- Login to the network site, edit the site, press Save Changes. (not sure why)
- Verify site loads and login works.
- re-add domain.
- restart browsers because of cached redirects.