How do I fix "Error establishing a database connection"? Print

  • 0

WordPress cannot reach the database, almost always because the credentials or the database itself changed.

  • Open wp-config.php and check DB_NAME, DB_USER, DB_PASSWORD and DB_HOST (localhost on our servers). The name and user almost always carry your account prefix, for example fonhost_shop.
  • In cPanel → MySQL Databases, confirm the database exists and that the user is attached to it with all privileges.
  • If you changed the database user's password, update wp-config.php to match.
  • Still failing? Check cPanel → Statistics - the account may have hit a disk or database quota.

Was this answer helpful?

« Back