Comments on: How to Fix “Error Establishing a Database Connection” in WordPress https://createawebsitenow.com Free resource for helping beginners to build, manage and grow their websites. Wed, 09 Feb 2024 13:44:10 +0000 hourly 1 https://wordpress.org/?v=6.0.1 By: Nick Sch"aferhoff https://createawebsitenow.com/error-establishing-a-database-connection/#comment-396455 Tue, 05 Oct 2021 13:32:42 +0000 https://createawebsitenow.com/?p=4664#comment-396455 In reply to Tatjana.

Hey Tatjana, that sounds like you had a plugin problem. Glad the solution worked for you! And yes, technology can be confounding at times.

]]>
By: Tatjana https://createawebsitenow.com/error-establishing-a-database-connection/#comment-394262 Sun, 26 Sep 2021 10:27:16 +0000 https://createawebsitenow.com/?p=4664#comment-394262 Thank you! The article is very helpful.
I renamed the plugins folder and the site worked again. So I changed the name back to “plugins” and the site still worked. That was super weird. But sometimes WordPress is full of mystery.

]]>
By: Nick Sch"aferhoff https://createawebsitenow.com/error-establishing-a-database-connection/#comment-391542 Fri, 27 Aug 2021 10:02:52 +0000 https://createawebsitenow.com/?p=4664#comment-391542 In reply to Shan Iqbal.

Thanks for the input, Shan. It’s true that re-installing WordPress can solve a lot of problems. However, it’s not always the solution for the error in establishing a database connection. Therefore, we recommend that users also check the other options listed above.

]]>
By: Shan Iqbal https://createawebsitenow.com/error-establishing-a-database-connection/#comment-390701 Mon, 16 Aug 2021 09:49:05 +0000 https://createawebsitenow.com/?p=4664#comment-390701 Let me tell you which one worked for me…

Simply follow the (Step 5) 1000% will solve your issue

Make sure you should have a backup of the wp-config.php file and please do the following things

1: Delete all the folders & files from a directory of your domain except one folder (wp-content) rename this folder like (wp-content-backup)
2: Now download the latest WordPress from official website
3: Paste into the same domain directory
4: now delete the wp-content folder and replace it with your own in step 1.
5: add your database details into a wp-config.php file and you are good to go…

Trust me it will solve your issue.

]]>
By: Nick Sch"aferhoff https://createawebsitenow.com/error-establishing-a-database-connection/#comment-380805 Mon, 07 Jun 2021 16:00:34 +0000 https://createawebsitenow.com/?p=4664#comment-380805 In reply to motasim ibr.

That’s one solution but not always the right one for every scenario.

]]>
By: motasim ibr https://createawebsitenow.com/error-establishing-a-database-connection/#comment-372447 Sat, 22 May 2021 15:37:23 +0000 https://createawebsitenow.com/?p=4664#comment-372447 very simple go phpmyadmin —>db —> select operation—-> Table maintenance—-> REPAIR TABLE `wp_options`

]]>
By: Michael https://createawebsitenow.com/error-establishing-a-database-connection/#comment-196255 Fri, 14 Aug 2020 10:14:18 +0000 https://createawebsitenow.com/?p=4664#comment-196255 In reply to Ask Paccosi.

You probaly – have been runnng on the old database on Godaddy. Because you did`t change/check your wp-confiq file.

Then 5 months after – Godaddy closed your database connection – I think that was a very fair threatment.

When you did`t change your wp-confiq credentials, you have still been using the database on Godaddy.

That problem do not lay on Godaddy or Hostinger, but only on you or the person that migrated the site for you. SORRY – hope you have a backup …

In the future, try look on Jetpacks backup program or use a plugin like Duplicator

]]>
By: Michael https://createawebsitenow.com/error-establishing-a-database-connection/#comment-196254 Fri, 14 Aug 2020 10:03:02 +0000 https://createawebsitenow.com/?p=4664#comment-196254 I think the “Database Connection Credentials” should be checked as number 1
If changing host or other “moving around”, thats were the first problem, like this will start.

]]>
By: Nick Sch"aferhoff https://createawebsitenow.com/error-establishing-a-database-connection/#comment-183535 Fri, 03 Apr 2020 11:43:14 +0000 https://createawebsitenow.com/?p=4664#comment-183535 In reply to uhuy.

Your English is definitely better than my Indonesian. And it sounds like you forgot to restore the database. I hope you backed up more than the htdocs folder otherwise it is lost. Happened to me before as well. Was a hard lesson to learn.

]]>
By: uhuy https://createawebsitenow.com/error-establishing-a-database-connection/#comment-180804 Tue, 10 Mar 2020 02:53:27 +0000 https://createawebsitenow.com/?p=4664#comment-180804 Hello there..
I was backing up my WP localhost htdocs, when i copied back its folder, and try to access it, the site said Error establishing a database connection.. I tried your tutorial but it didn’t work. I’m confused because i am not a programmer i am just a marketer hahahah

*sorry for my english, i am from indonesia..
Thanks

]]>
By: Nick Sch"aferhoff https://createawebsitenow.com/error-establishing-a-database-connection/#comment-180328 Tue, 03 Mar 2020 14:07:15 +0000 https://createawebsitenow.com/?p=4664#comment-180328 In reply to Brooke.

Always a good thing to do. Thanks for the additional tip!

]]>
By: Brooke https://createawebsitenow.com/error-establishing-a-database-connection/#comment-179335 Thu, 20 Feb 2020 03:06:35 +0000 https://createawebsitenow.com/?p=4664#comment-179335 Make sure you save your wp-content folder!

]]>
By: Nick Sch"aferhoff https://createawebsitenow.com/error-establishing-a-database-connection/#comment-178526 Fri, 07 Feb 2020 10:45:59 +0000 https://createawebsitenow.com/?p=4664#comment-178526 In reply to Daniel Clode.

Daniel, that sounds like it might be a DB problem. Do you have a backup from an earlier time? If so, saving a copy of your current website and restoring the old backup will tell you if that is actually the issue.

]]>
By: Daniel Clode https://createawebsitenow.com/error-establishing-a-database-connection/#comment-177581 Wed, 22 Jan 2020 12:40:21 +0000 https://createawebsitenow.com/?p=4664#comment-177581 Hi,

When i update a page it updates this page with incorrect content. When i check in WP it looks ok but the DB is serving incorrect content. I guess this is a corrupted DB as it does this with different templates. Any ides how i can fix this or just understand why this is happening.

Many thanks

D

]]>
By: Nick Sch"aferhoff https://createawebsitenow.com/error-establishing-a-database-connection/#comment-174217 Thu, 19 Dec 2019 12:57:35 +0000 https://createawebsitenow.com/?p=4664#comment-174217 In reply to Ask Paccosi.

Do you have any sort of backup of your site, preferably offline? Does Hosting perform regular backups that you could restore from? This is what I would look into, since it’s unlikely that you can still get your data back from Godaddy if your contract ended a while ago.

]]>