Error establishing a database connection in WP?

[ad_1]

Hi,

Yesterday I installed WP on my new domain. As went through the steps of installation, i noticed that WP missed to ask me for DataBase information. Anyway, it still installed it and everything went fine. I chose a theme, customized it, until today, when visiting the website, what i see is – **”Error establishing a database connection”.**

What? Why?

I went to check the wp-config file, and what i see is that it had inserted random info as username, db name, password and etc. Something like “maa” . What’s even that? Okay, so i proceeded to change to the db name, db username and password i had previously created and it still doesn’t work.

Has anyone went through such problem? How can it be fixed?

I really hope that i can get back all the edits that were made on the website last night. It took hours. 🙁

[ad_2]
1 Comment
  1. Typically, the “Error establishing a database connection” message indicates that WordPress is unable to connect to your database using the information in the wp-config file, which you already know, as I can see.

    You could try the following:

    1. Verify your database credentials in the wp-config file to ensure that the database name, username, password, and host are correct. Use the details provided by your hosting provider.
    2. Is your database server currently running and accessible? There might be temporary downtimes.
    3. Use phpMyAdmin or a similar tool provided by your hosting provider to fix your WordPress database, if that is needed.
    4. Disable plugins and switch to a standard WordPress theme to see if they are causing database connection issues.
    5. If you have a backup of your website from before the issue, you can use it to restore the edits made last night (BTW we always do backups with our backup tools before we start working heavily on some site, AND after we finish it – offsite backups via All in one WP migration plugin and our SG hosting’s backup (sometimes even via SaaS BlogVault tool).

    If the steps don’t work, reach out to your hosting provider for assistance.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer