Move WP multisite to dev or test site¶
With Wordpress multi-site, there are several extra steps involved in moving a site around.
- Follow all the steps from Set up a New Website. At this point you will have an "Error Establishing Database Connection" error when you try to connect.
wp search-replace https://oldsite.name https://newsite.name.
- If for whatever reason
wp-clidoesn't work (e.g. this bug) you can use a web-based tool:
- Download the interconnectit Search-Replace-DB to the Wordpress root: @git clone https://github.com/interconnectit/Search-Replace-DB.git@
- open http://hcn.local/Search-Replace-DB in your browser.
- Replace "https://oldsite.name" with "https://newsite.name".
- When finished, press the "Delete Me" button - this script is a major security risk!
- If this is a new site, make sure these lines are set appropriately in
define('WP_HOME','http://hcn.local'); define('WP_SITEURL','http://hcn.local'); define('FORCE_SSL_ADMIN', false); define('RELOCATE',true);