I recently tried to back up my WP site to another (completely separate) web server. I ftp'd from Server 1, uploaded to Server 2, exported my SQL table from Server 1, imported to Server 2, and edited the wp_config.php on Server 2 to reflect the new site:
define( 'DB_NAME', 'Server2Name' );
define( 'DB_USER', 'Server2Name' );
define( 'DB_PASSWORD', 'Server2Pass' );
define( 'DB_HOST', 'Server2Address' );
define( 'DB_HOST_SLAVE', 'Server2Address' );
$table_prefix = 'Server2TableName';
I also commented out a couple lines that mentioned Server 1, and uploaded it. It showed Error Establishing a Database Connection, but after adding
define( 'WP_ALLOW_REPAIR', true );, I was able to reach the repair page.
Here's my issue: When Server 2 has the original
wp_config.php file, it redirects to the site at Server 1. When edited, Server 2 returns Error Establishing a Database Connection, and so does Server 1. Even if I use the URL for Server 1 without making any edits on Server 1, changing the config file on Server 2 makes Server 1 reply Error Establishing a Database Connection.
I want to run the repair on Server 2 to fix it's settings, but since changes on Server 2 are (somehow??) preventing Server 1 from showing, I don't want to run anything without really messing things up.
I'd love to be able to have two separate, working copies.