0

A site that was working fine previously is now getting an error,

Error establishing a database connection

I have dealt with this error while creating new wordpress sites(when there was something wrong with the config file). This time, the error occurred when the user upload a file to public_html folder. Can anyone suggest me what would have gone wrong and how to fix it?

Thanks in advance.

  • Did you checked your wp-config.php file? Is database name or password is changed? – Sisir Aug 6 '11 at 7:30
  • Where is that located? Can you please guide me? – user2238 Aug 6 '11 at 7:49
2

Did you checked your wp-config.php file? Is database name or password is changed?

wp-config.php file is located on the root directory you installed wordpress. Open the file and you will see database password, username etc that wordpress use to connect your database. Check the username, passwords are correct.

/** The name of the database for WordPress */
define('DB_NAME', 'your_database_name');

/** MySQL database username */
define('DB_USER', 'your_database_username');

/** MySQL database password */
define('DB_PASSWORD', 'your database password');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy