Support » Networking WordPress » "Error establishing a database connection" after changing DOMAIN_CURRENT_SITE

  • Resolved Aren Cambre


    I have a WordPress Network at, say, That’s also the value for DOMAIN_CURRENT_SITE in wp-config.php.

    This Network is on a Red Hat Enterprise Linux 6 system. It’s under our control, in our data center. This server has had another WordPress Network running for over a year.

    We need to switch to before this newer Network goes live. We don’t have the DNS set up yet, so I altered the hosts file on my local PC to add, plus I adjusted DOMAIN_CURRENT_SITE in wp-config.php to be

    Strangely, when I go to, I get this error: Error establishing database connection. If I switch DOMAIN_CURRENT_SITE back to, the site resumes working fine, and visits to are redirected to (which shows my hosts file is correctly set up).

    This baffles me because I’ve not changed the database settings, nor have I changed anything with the server’s own network settings. What am I doing wrong with this install?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Ipstenu (Mika Epstein)


    Moving Multisite is a pill.

    You can’t just move it, you have to edit the DB otherwise it literally looks for in your DB and treats THAT as a DB error :/


    Aren Cambre


    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘"Error establishing a database connection" after changing DOMAIN_CURRENT_SITE’ is closed to new replies.