Extremely frustrated, please help :/
I went to set up a new sandbox of my existing WordPress site. Everything there works 100%.
I copied over all files, created a new database, copied over the database. I changed the wp-config.php to match the new database values. I searched for every instance of the old url in the database and changed them all to the new one.
I *know* they are correct because I ran this code with the username/password copy pasted directly over and it worked.
<?php $db = @mysql_connect('localhost', 'un', 'pw'); if (!$db) echo "connection failed"; else echo "connection succeeded"; ?>
My front page loads fine. My wp-admin loads fine. However, every single page shows the "Error establishing a database connection" error.
I have tried emptying the cache, changing file permissions, repairing every table in the database, running the repair script.
Please help. Thank you.