Skip to Content

How to Protect WordPress Site from Attacks and Improve Performance with CloudFlare

  • CloudFlare sits between your site and the internet, providing powerful security and performance tools through its global network. Enabling the proxy service unlocks the full benefits.
  • Block unwanted traffic like XML-RPC and suspicious login attempts using CloudFlare rules. This improves security and speeds up your site.
  • For WordPress sites targeted by attacks, CloudFlare can dramatically enhance performance by reducing strain on server resources. This helps prevent premature hosting upgrades.

Secure your WordPress site and speed it up using CloudFlare’s powerful tools for blocking threats and reducing resource usage.

Problem

Keeping your WordPress site safe from hackers and running fast are top priorities for any site owner. Recent malware attacks have highlighted the need for better security. Meanwhile, optimized performance ensures a smooth experience for visitors. This guide covers two easy ways to leverage CloudFlare to both protect your site and improve speed by reducing strain on your server resources.

Solution 1: Disable XML-RPC in WordPress

XML-RPC is a feature that allows remote APIs to communicate with your WordPress site. Most sites don’t need it active. Unfortunately, XML-RPC can be exploited by attackers to compromise your site. Disabling it improves security.

To disable XML-RPC:

Step 1: In the CloudFlare dashboard, go to Security > WAF (Web Application Firewall)

In the CloudFlare dashboard, go to Security > WAF (Web Application Firewall)

Step 2: Create a rule blocking URI containing “xmlrpc

Create a rule blocking URI containing “xmlrpc”

Step 3: Deploy the rule

Blocking XML-RPC prevents unneeded traffic from reaching your server. This lightens the load and frees up strained resources.

Soluton 2: Scrutinize Login Attempts

Login pages are a prime target for brute force attacks. CloudFlare can add an extra layer of protection by scrutinizing every login attempt.

To activate:

Step 1: Create a page rule in CloudFlare for your /wp-login.php URL

Create a page rule in CloudFlare for your /wp-login.php URL

Step 2: Set the Security Level to “I’m Under Attack

Set the Security Level to “I’m Under Attack”

This subjected all login traffic to maximum scrutiny, blocking suspicious access attempts.

Conclusion

CloudFlare puts powerful protections within reach for any WordPress site owner. Try these steps to secure your site and speed it up. Let us know in the comments if you have any other questions!

Disclaimer: This article provides general information and suggests possible solutions to improve WordPress security and site performance. However, results may vary based on your specific site configuration and needs. We recommend working with a qualified technician to implement any major site changes, especially related to security. This article should not be taken as professional legal, security, or technical advice.

Alex Lim is a certified IT Technical Support Architect with over 15 years of experience in designing, implementing, and troubleshooting complex IT systems and networks. He has worked for leading IT companies, such as Microsoft, IBM, and Cisco, providing technical support and solutions to clients across various industries and sectors. Alex has a bachelor’s degree in computer science from the National University of Singapore and a master’s degree in information security from the Massachusetts Institute of Technology. He is also the author of several best-selling books on IT technical support, such as The IT Technical Support Handbook and Troubleshooting IT Systems and Networks. Alex lives in Bandar, Johore, Malaysia with his wife and two chilrdren. You can reach him at [email protected] or follow him on Website | Twitter | Facebook

    Ads Blocker Image Powered by Code Help Pro

    Your Support Matters...

    We run an independent site that is committed to delivering valuable content, but it comes with its challenges. Many of our readers use ad blockers, causing our advertising revenue to decline. Unlike some websites, we have not implemented paywalls to restrict access. Your support can make a significant difference. If you find this website useful and choose to support us, it would greatly secure our future. We appreciate your help. If you are currently using an ad blocker, please consider disabling it for our site. Thank you for your understanding and support.