• hello.
    The password seems to have been exposed, so I received a message to change it and changed the admin page password. But suddenly, the following message pops up and neither the homepage nor the admin page opens. The message is:

    Error establishing a database connection

    This either means that the username and password information in your wp-config.php file is incorrect or that contact with the database server at localhost could not be established. This could mean your host’s database server is down.

    • Are you sure you have the correct username and password?
    • Are you sure you have typed the correct hostname?
    • Are you sure the database server is running?

    If you are unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress support forums.

    I’m a beginner, so it’s difficult to solve even if I search a lot. I need help.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Hi @cometrueaswished. I am not sure what could be the connection between updating your password and the error you describe, but here’s how you can fix it:

    • Connect to your site via SFTP and locate a file called wp-config.php, it should be in the root folder. That is the file you want to edit to ensure your database name, username and password are correct.
    • Log into your dashboard at your hosting company (it appears to be Digital Ocean) and confirm the name of the database you are connecting your site to, as well as the username and password to access it.
    • Go back to your wp-config.php file to check the information is correct

    If you are unsure where to find this database information or how to access your site’s files via SFTP, I would recommend reaching out to Digital Ocean, they will have the details.

    Good luck!

Viewing 1 replies (of 1 total)
  • The topic ‘Error establishing a database connection’ is closed to new replies.