There was a problem loading the comments.

Fix WordPress “Error establishing a database connection” (GARMTECH hosting)

Support Portal  »  Knowledgebase  »  Viewing Article

  Print

The WordPress message “Error establishing a database connection” means the website cannot connect to its MySQL/MariaDB database. On GARMTECH hosting this is usually caused by an incorrect database password after a migration, or by deleted/changed database users.

Step 1 — Quick checks

  • Reload the page and try again in a few minutes (temporary overload can happen).
  • Check if other websites in the same hosting subscription work. If everything is down, check Plesk first.
  • Make sure you have free disk space (a full account can cause database issues).

Step 2 — Verify database credentials in Plesk

  1. Log in to Plesk.
  2. Go to Databases and find the database used by the website.
  3. Check the database user. If you are not sure, open your website’s wp-config.php in Plesk File Manager and look for:
    • DB_NAME
    • DB_USER
    • DB_PASSWORD
    • DB_HOST (on Plesk it is usually localhost)
  4. If you suspect the password is wrong:
    1. In Plesk → Databases → open the database user and set a new password.
    2. Update DB_PASSWORD in wp-config.php to the same value.

Step 3 — Check if the database is reachable

  • In Plesk → Databases, click phpMyAdmin for the same database.
  • If phpMyAdmin opens and tables exist, the database itself is OK — the problem is usually credentials in wp-config.php.

Step 4 — If the website was moved/migrated

  • Make sure the database was imported into the correct database.
  • Make sure the database user has permissions for that database.
  • If the old host used a different DB host (not localhost), update DB_HOST to match Plesk (usually localhost).

Step 5 — Restore from a backup

If the database is corrupted or missing tables, restore the website or database from a Plesk backup (Backup Manager) or from your own backup file.

Related articles

  • Create a database and user in Plesk (MySQL/MariaDB)
  • phpMyAdmin in Plesk: import/export a database
  • Create and restore backups in Plesk (Backup Manager)

Share via
Did you find this article useful?  

Related Articles


Comments

Add Comment

Replying to  

Tags

© GARMTECH