Actions
{{last_updated_at}} by {{last_updated_by}}
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.
- Run
wp search-replace https://oldsite.name https://newsite.name
. - If for whatever reason
wp-cli
doesn'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
wp-config.php
:
define('WP_HOME','http://hcn.local');
define('WP_SITEURL','http://hcn.local');
define('FORCE_SSL_ADMIN', false);
define('RELOCATE',true);
Updated by Jon Goldberg over 7 years ago · 1 revisions