Project

General

Profile

Move WP multisite to dev or test site » History » Version 1

Jon Goldberg, 11/27/2017 11:22 PM

1 1 Jon Goldberg
{{last_updated_at}} by {{last_updated_by}}
2
# Move WP multisite to dev or test site
3
4
With Wordpress multi-site, there are several extra steps involved in moving a site around.
5
6
* 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.
7
* Run `wp search-replace https://oldsite.name https://newsite.name`.
8
* If for whatever reason `wp-cli` doesn't work (e.g. [this bug](https://github.com/wp-cli/wp-cli/pull/4527)) you can use a web-based tool:
9
 * Download the interconnectit Search-Replace-DB to the Wordpress root: @git clone https://github.com/interconnectit/Search-Replace-DB.git@
10
 * open http://hcn.local/Search-Replace-DB in your browser.
11
 * Replace "https://oldsite.name" with "https://newsite.name".
12
  * When finished, press the "Delete Me" button - this script is a major security risk!
13
* If this is a new site, make sure these lines are set appropriately in `wp-config.php`:
14
15
```
16
define('WP_HOME','http://hcn.local');
17
define('WP_SITEURL','http://hcn.local');
18
define('FORCE_SSL_ADMIN', false);
19
define('RELOCATE',true);
20
```