Error in Database Connection is a message that’s common among blogs and in case this happens to you, the best thing to do is migrate from the current hosting company to a better one. This error comes when your site exhaust resources allocated, the hosting company may not indicate that resources have been exhausted, they will instead suspend your website which will result in the error in database connection message. Whenever you try to open a site and realize that it can’t open but there is “error in database connection”, know that it has been suspended by its hosting company.
I experienced this problem several times before I made a lasting solution. Initially, all my sites were hosted in Kenya but when the problem persisted, I decided to relocate them to Kinsta Managed WordPress Hosting. For five years, I have experienced zero problems. Sometimes my sites get up to 30 million visits in a month, I get worried but eventually realize that Kinsta servers can manage that amount of traffic.
It’s normal that when a blog is new, it can’t get the error in database connection message because the resources it utilizes are minimal but once it starts getting more and more visitors, the hosting company would suspend it. Most bloggers take action by contacting their hosting companies. The only thing they will help you with is to bring your site up but again, after few days, it will go offline.
Instead of going round and round, it’s good to look for a lasting solution, change your hosting company. The problem is to get the best hosting company where the issue of error in database connection won’t arise again. I will suggest that you choose Kinsta because I am also their client. Of course you will pay at least $30 per month, but you’ll be assured that your site is safe and in perfect form all the time, you can check the plans offered by Kinsta here
The company will migrate your site for free and it takes less than 1 hour to migrate. Other hosting companies will charge you for migrating the site.