Question

can't resolve error establishing database connection

Posted August 3, 2020 253 views
WordPress

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.

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.

×
3 answers

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

by Brian Boucheron
WordPress is one of the most popular open source content management systems in the world. Although it started out focused on blogging, over the years it has developed into a more flexible platform for websites in general. After almost fifteen years of development it is quite polished and robust, yet issues can still come up. If you've recently attempted to load your WordPress-powered website and instead saw a message stating "Error Establishing Database Connection", the cause is most often...
  • Hi, thanks. It seems like my server ran out of memory and quit. But, how is this possible? I am using the smallest plan but I have around 40-50 visitors a day. As I see, my memory fluctuates around 60%, is this normal?

Hello, Regarding the XML-RPC issue, refer to below link:

https://www.digitalocean.com/community/tutorials/how-to-protect-wordpress-from-xml-rpc-attacks-on-ubuntu-14-04

Cheers,
Sri Charan

by Jon Schwenn
WordPress is a popular and powerful CMS (content management system) platform. Its popularity can bring unwanted attention in the form of malicious traffic specially targeted at a WordPress site. There are many instances where a server that has not been protected or optimized could experience issues or errors after receiving a small amount of malicious traffic. This guide will show you how to protect WordPress from XML-RPC attacks on an Ubuntu 14.04 system.

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.

Submit an Answer