Error establishing a database connection

Website URL

Error Message

This happens when I try to do anything in wordpress

Other Information

77 hours ago I added a custom domain

I believe there was an outage on the SQL server. Have you confirmed the database credentials? The /wp-admin page appears to be working, which indicates that the database is connected.


what can I do it fix it, it is still showing error when I try to edit page

Can you enable WP_DEBUG to get more information about the issue?

Also, did you do this?


I don’t know how to do that, sorry. Can you please explain how to use wp-debug and verify credentials?

I have enabled wp-debug I belive, what do I do next?

This is the error I get on homescreen for wp-admin

Deprecated : Using ${var} in strings is deprecated, use {$var} instead in /home/vol1_3/ on line 46

The next step is to reproduce the issue. You were saying you had problems with the database connection? Then please try to trigger that error again. With WP_DEBUG enabled, you should get a much more detailed error message.

You can ignore deprecation warnings. This warning means that the wpforms-lite plugin is using code that will stop working in a future PHP version. You don’t need to concern yourself with that.


I don’t get the error anymore so it might have been an sql server down. Thank you for your support I am unable to reproduce the issue anymore.

I have successfully reproduced the error by clicking on the Astra button on dashboard causing the problem to show. Also the Astra theme forced me to set wp-debug to be false. Also after trying to repoduce it now stops showing, and in other attempts clicking on anything such as plugins also causes error message, but then after 2nd attempt issue is inapparent.

It could be a max_user_connections issue, some heavy WordPress sites have the tendency to cause those.

Every database user is only allowed to have a limited number of database connections. If that limit is hit, additional connections cannot be opened until the number of active connections is reduced. This could explain why you only get the error sometimes: even a website that uses too many database connections will only sometimes see this issue.


What do I?

Reduce the number of plugins used?


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.