How do I fix "Error establishing a database connection"?
The message "Error establishing a database connection" means your site (usually WordPress) cannot talk to its database. The site's files are fine; the link to the database is the problem.
Most common causes and fixes:
- Wrong database credentials. Check
wp-config.php(via File Manager at my.dirhamaday.ae) forDB_NAME,DB_USER,DB_PASSWORDandDB_HOST. These must exactly match the database and user in the panel's MySQL Databases tool. A recently changed database password is a frequent culprit. - DB_HOST value. On our servers this is normally
localhost. Confirm it is correct. - Corrupted database. If credentials are right, the database may need repair. In WordPress, add
define('WP_ALLOW_REPAIR', true);towp-config.php, then visityourdomain.ae/wp-admin/maint/repair.php. Remove the line afterwards. - Resource limits. A traffic spike or a heavy query can briefly exhaust database connections.
If you have just migrated the site, this error usually means the database was not imported or the credentials in wp-config.php point to the old host.
If you cannot resolve it, contact our 24/7 UAE team on WhatsApp +971 58 553 6767 or support@dirhamaday.ae. We can check the database, credentials and server status and get you reconnected.
Still need a hand? Our UAE-based team is here 24/7.