Making a copy of my multi-site WP install for testing

I have done the following steps (see below) to make an exact copy of my multi-site WP that I can use for testing. My main site is located at and my 2nd site at I’m setting up the new site at and my second site then at I’m creating the duplicate copy at (and the second site then at

I can access the main site fine (, but I’m having problems with the second site ( When I activate multi-site in the wp-config file, I get the following error: Error establishing a database connection and can’t access anything. When I delete the multi-site lines from the wp-config file, I get back to the main site fine.

Here are the steps I’ve followed:

1) Installed wordpress in a new subfolder (selecting multi-site install)

2) Copied wp-content themes, plugins & uploads from the live site to the /stage2 files (replacing everything that was there for themes, plugins & uploads under wp-content).

3) Deleted the DB that was created when WP was installed using My SQL Databases in C-panel.

4) Copied the database from the live site to a new database using PHPMyAdmin (Operations, Copy Database to:, selected Structure & data and to Create database before copying & Auto-increment value check boxes are checked).

5) Added a user to the database giving all privileges.

6) Edited the database using SQL to change the URLS to the new site (for both sites sudswp is the main site sudswp_2 is the second site:

UPDATE sudswp_options SET option_value = REPLACE(option_value, ‘’, ‘’);

UPDATE sudswp_postmeta SET meta_value = REPLACE(meta_value, ‘’, ‘’);

UPDATE sudswp_posts SET guid = REPLACE(guid, ‘’, ‘’);

UPDATE sudswp_posts SET post_content = REPLACE(post_content, ‘’, ‘’);

UPDATE sudswp_2_options SET option_value = REPLACE(option_value, ‘’, ‘’);

UPDATE sudswp_2_postmeta SET meta_value = REPLACE(meta_value, ‘’, ‘’);

UPDATE sudswp_2_posts SET guid = REPLACE(guid, ‘’, ‘’);

UPDATE sudswp_2_posts SET post_content = REPLACE(post_content, ‘’, ‘’);

7) Edited the wp-config file for DB_NAME, DB_USER, DB_PASSWORD & table_prefix to be correct.

At this point I can access the main site and everything is working. The second site gives me a 404 page not found (as I would expect since Multi-site is not yet activated in wp-config)

So then I continue to activate Multi-site:

1) Add define( ‘WP_ALLOW_MULTISITE’, true ); to the wp-config file & FTP it to the site

2) Deactivate all Plugins

3) Go to WP Admin -> Tools -> Network Setup and get the info to copy to the wp-config & .htaccess files. The .htaccess file is already identical to the information provided

Added the following lines to the wp-config file:

define(‘MULTISITE’, true);

define(‘SUBDOMAIN_INSTALL’, false);

define(‘DOMAIN_CURRENT_SITE’, ‘’:wink:;

define(‘PATH_CURRENT_SITE’, ‘/stage2/’:wink:;

define(‘SITE_ID_CURRENT_SITE’, 1);

define(‘BLOG_ID_CURRENT_SITE’, 1);

Now when I try to access the site, I get the Error establishing a database connection message – even when trying to access the main site at

If I remove the multi-site I can get back to the main site fine.