Ready to get started?Download WordPress


Database error all of a sudden - site was fine (6 posts)

  1. jamesbuck
    Posted 1 year ago #

    Hi, one of my WP sites suddenly came up with a database connection error. See:


    Error establishing a database connection
    This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at db1716.perfora.net. This could mean your host's database server is down.

    I verified with hosting service that the server is running. The database was connecting fine with the credentials before (for years). I updated the credentials just to double check, and updated wordpress (via FTP, since I can't log in).

    Any ideas? This is an important news site in Egypt - it's not impossible something was hacked, but I'm not sure how that would cause a db issue.


  2. esmi
    Forum Moderator
    Posted 1 year ago #

    This indicates that there is a problem with your database server or with the details you entered in wp-config.php. There are no other reasons for that particular error message.

  3. jamesbuck
    Posted 1 year ago #

    Thanks - but the wp-config file did not change. It's been the same for years. And I looked at it and verified that the details are right.

    The host verified that the server is running.

    The only thing I can think of is that the host recently upgraded to PHP5. Before I had had some kind of workaround to map to PHP5, or pretend it was 5.. maybe in .htaccess.. can't remember. Not sure if that would cause any problems/is worth investigating?

  4. esmi
    Forum Moderator
    Posted 1 year ago #

    Yes. That would come under server issues.

  5. jamesbuck
    Posted 1 year ago #

    Never mind the last paragraph - I found the map to PHP5 in .htaccess code, and this install did not have it.

    So back to trying to figure out what caused it.

  6. jamesbuck
    Posted 1 year ago #

    Thanks. To be clear, the server IS working fine, have verified with host.

Topic Closed

This topic has been closed to new replies.

About this Topic