Question

can't resolve error establishing database connection

I get this error at least twice a week on my wordpress website. I confirmed an attack with ‘‘grep xmlrpc /var/log/apache2/access.log’’ I enabled ‘‘sudo a2enconf block-xmlrpc’’

And, I even also set up a plugin called Stop XML-RPC Attacks. It was worse in the past but I still get this error, how can I stop it?

For example, I got this error today and I typed ‘‘grep xmlrpc /var/log/apache2/access.log’’ and got nothing.

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi @rem3n,

What you can do is actually block access to XMRPC.php file and allow access only to needed IP addresses.

Additionally, you can try and configure fail2ban. It should be able to help incase someone is doing a DDoS.

Hello,

Request you to refer to below link, which guides you on how to troubleshoot the Database connection error:

https://www.digitalocean.com/community/tutorials/how-to-debug-the-wordpress-error-establishing-database-connection

Cheers, Sri Charan