• Hi,

    I recently moved my site over to a VPS because the traffic wasn’t suitable for a shared service. It was working fine for about a week, then tonight it went down with the “Error establishing a database connection” message (on both the homepage and wp admin).

    As I am on VPS I have no support, my hosts have just responded that I need to increase the spec on my VPS to “having at least 2 cores/2GB RAM” but I’m not sure that would even be the root cause of the issue.

    Does anyone have any guidance on fixing the error for a VPS? There has been surge in traffic today (approx 15,000 hits) which could have potentially caused it, nothing else has changed and I hadn’t even logged in today.

    Really appreciate any answers offered, I have read a few posts about error establishing a database connection but none of them seem to relate to a VPS service.

    Thanks,

    Jemma

Viewing 1 replies (of 1 total)
  • Moderator t-p

    (@t-p)

    Error connecting to your database:
    You are getting this error because WP is unable to establish a database connection. Reason why WP is unable to establish a database connection can vary. It could be that your database login credentials are wrong or have been changed. It could be that your database server is unresponsive. It could be that your database has been corrupted. Also, There could be other factors as well.

    Troubleshooting this problem:
    – double check your wp-config.php file settings for the database name, database username and database password. This is where most errors occur.
    – Then check that you don’t need to change the database host from “localhost” to something else. You can get that info from your hosting provider.
    – Check you have actually created a database with the same database name as is in your wp-config.php file.
    – Last, but not least, if all that information is correct your database probably has a problem with it, and you may need to contact your hosting provider if the database server is online / if they have any other problem at their end, or they made any changes to your account, or if there are any limitations/restrictions, if the hosting package is set to Windows and not Linux, etc.
    – There are also many threads on this topic on these forums: http://ww.wp.xz.cn/search/Error+establishing+a+database+connection?forums=1

Viewing 1 replies (of 1 total)

The topic ‘Error establishing a database on a VPS’ is closed to new replies.