/* */

How To Fix “Error Establishing A Database Connection” In WordPress

Learn how to fix “Error Establishing A Database Connection” on your WordPress blog!

Blog post: https://www.elegantthemes.com/blog/tips-tricks/how-to-fix-error-establishing-a-database-connection-in-wordpress

Linked mentioned: www.yourwebsite.com/wp-admin/maint/repair.php

Like us on Facebook: https://www.facebook.com/elegantthemes/



  1. You are soo good, thanks a million times buddie.

  2. what if I can't find the wp-config file in phpmyadmin ? it's nowhere to be found and I can't go forward with troubleshooting 🙁

  3. 非常感谢!爱来自中国

  4. I didn't give my new database privileges and the MySQL databases allowed me to do that thank you.

  5. What I need to know is what directory the sql file goes in on the server. I’m having to migrate my word press site manually. Due to upload file size limit. What directory contains the SQL file?

  6. Thank you, I was able to repair my database and get my site back online using your tutorial

  7. Thanks Bro… First Option didn't work but the second worked instantly.

    Great Tutorial, straight to the point… Sweet.

  8. Thank you, this tutorial saved my nerves and brought my site back to life! 🙂

  9. The site was doing fine until "Error establishing a database connection" appeared in rare occasion the site could be accessed sometimes not is it the site problem?

  10. OMG thank you so much problem fixed with the first option,,,, you are genius among men.

  11. where can i find wp directory ?

  12. Liked & Subscribed. You really saved my ass dude. Thank You

  13. Uncaught mysqli_sql_exception: Access denied for user 'root'@'localhost' (using password: NO)
    i keep receive this error message, anyone know what to fix

  14. This helped me to address my issue.
    i had previously changed my cpanel name and this changed the username of all my databases. so i logged in to my cpanel, root directory of my website and edited the wp config file and put the correct username of my databases. i first checked the username of my databases using the cpanel file manager.

  15. Thanks first option worked. U r legend

Leave a Reply

Your email address will not be published. Required fields are marked *