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.


Submit an answer

This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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