How to Fix the Establishing a Database Connection Error in WordPress

  1. Read the full Aspen Grove Studios’ article. 00:57
  2. The WordPress Error Establishing a Database Connection alert is particularly frustrating as there are a plethora of possible reasons as to why the alert is showing.  01:17
  3. The first thing you should do is contact your hosting provider. The server may be down. 02:22
  4. If that doesn’t help, try to repair the Corrupt Database.  02:50
  5. Another thing you can do is check the login details. 03:05
  6. For more details, we recommend to check out the article. 03:30

 

Read the full episode transcript below:

00:28 David: Hey, everybody. Welcome to another episode of WP The Podcast, brought to you by WP Gears. I’m David Blackmon.

00:37 Tim: And I’m Tim Strifler.

00:39 David: Today we’re going to talk about how to fix that pesky establishing a database connection error in WordPress. I’m not even going to lie. I’m not even going to pretend that I’m the technical guy on this side of team. I’m just going to throw it over to my good friend Tim and let him tell you how.

00:57 Tim: Yeah, absolutely. Ironically enough, though, David’s company, Aspen Grove, actually has a brilliant article on this topic that we linked to in the show notes, but you can go to AspenGroveStudios.com and click the search icon in their menu and type in database connection, and you’ll be able to find the article.

01:17 Tim: But basically the error comes up from time to time and there isn’t one solution, and the reason why is it could be a few different things. So that’s why it can be tricky to troubleshoot. So a couple of the things that could be causing it is the server is down, and so you’re not getting a DNS error because the server isn’t 100% down, but the my sequel database side of the server is down.

01:41 Tim: The database could also be corrupt. That happens with WordPress from time to time. Things can cause the database to be corrupt. And then the third thing is the database login details are incorrect, and so essentially your WP config file that is on your server has the database login details that basically gives WordPress the credentials to go in and access the database, store content in the database, display content from the database, and so it’s a really crucial part. And so you might have been messing around in the WP config file and accidentally changed some things, and so that could cause the issue.

02:22 Tim: But if that issue was happening completely out of the blue, I would say the first thing you should do is contact your hosting provider because it could be something that you didn’t do, it’s something that happened on their end, and so they might be able to fix that a lot more quickly. However, depending on your hosting provider and all of that, you may have to do some troubleshooting yourself.

02:41 Tim: One of the things you can try is repair the corrupt database, and again, the best thing to do is to access the article that we have linked from AspenGroveStudios.com. It’s going to show you how to do this, but you basically do a database repair. It’s putting a little snippet into your WP config file and that’s going to run a script that’s going to attempt to repair your database.

03:05 Tim: So, yeah. Another thing you can do is check the login details. So as I mentioned, the WP config file’s going to have those login details and you can go into your C panel and see what those login details are. You can reset the password, the db_password.

03:23 Tim: So yeah, it’s kind of hard to really walk you through the steps in an audio podcast, and so I wanted to kind of hit on the big things and explain why it happens and the steps you can do, but definitely go check out the article because it’s going to walk you through. It’s very detailed, of all the different things you can do. But yeah, sometimes the best thing to do is get on the horn with your hosting provider or live chat, whatever it may be.

03:51 David: Awesome. Well, I’m so glad that I was able to be a great resource to our podcast listeners today by introducing this great topic.

03:58 Tim: Yeah, and providing the awesome blog post, so.

04:01 David: Yeah, we do have a really good content team that puts together some really useful blog posts, so if you’re … we try to cover everything WordPress, so I know we’re a big divvy company, but we do cover a lot of things WordPress-related as well.

04:18 David: Tomorrow we’ve got another great topic, our favorite WordPress hosting for 2019. Tim, until tomorrow. We’ll see you then.

04:29 Tim: Take care. Bye-bye.

 

Did you Enjoy this Episode?

  • Will you consider sharing it online? Just click one of the share buttons below!
  • Will you leave us a review? 🙂
  • Have a question, or a topic request? Let us know in the comments below!

Want to Connect with David & Tim?

Submit a Comment

Your email address will not be published.

Where To Find Us

Listen to WP The Podcast on your favorite platform: