Error establishing a database connection

May 24, 2019 225 views
WordPress Ubuntu

I get this error when trying to load my wordpress site, does this have anything to do with the BLR1 Networking Issue notice that I get when I log into digitalocean?

“Error establishing a database connection”

“The network problems in our BLR1 region have returned and we are actively working to improve and monitor the state of the network. Users may experience latency and/or connectivity issues during this time. We will post an update when we have additional information or once the issue is fully resolved.”

2 Answers

This is due to a problem with your server, nothing to do with the networking.
Try checking your error logs including apache2/nginx error.log and mysql error.log. If your error logs say such as cannot allocate memory, then you should consider upgrading your droplet to one with more RAM.

Rebooting your server should fix the issue but you need to dig deeper if it keeps happening.

This happened to one of my local sites a few months back. There’s a really easy to follow guide here at that has a video as well on how to solve it

Have another answer? Share your knowledge.