Wordfence Scan Stops When Using Cloudflare: A Comprehensive Guide to Resolve the Issue
Image by Manon - hkhazo.biz.id

Wordfence Scan Stops When Using Cloudflare: A Comprehensive Guide to Resolve the Issue

Posted on

Are you experiencing frustrating issues with your Wordfence scan stopping mid-scan when using Cloudflare? You’re not alone! Many WordPress users have reported this problem, but don’t worry, we’ve got you covered. In this article, we’ll delve into the reasons behind this issue and provide step-by-step instructions to resolve it once and for all.

What’s Causing the Wordfence Scan to Stop?

Before we dive into the solutions, it’s essential to understand the root cause of the problem. There are two primary reasons why the Wordfence scan stops when using Cloudflare:

  • Cloudflare’s Security Features: Cloudflare’s security features, such as IP blocking and rate limiting, can interfere with Wordfence’s scanning process. These features are designed to protect your website from malicious traffic, but they can also block legitimate traffic from Wordfence’s scanning IP addresses.
  • Wordfence’s Scanning Mechanism: Wordfence’s scanning mechanism relies on making HTTP requests to your website to scan for malware and vulnerabilities. When Cloudflare is enabled, these requests can be blocked or delayed, causing the scan to stop prematurely.

Resolving the Issue: Step-by-Step Instructions

Now that we understand the causes, let’s move on to the solutions. Follow these steps to resolve the Wordfence scan stopping issue when using Cloudflare:

Step 1: Whitelist Wordfence’s IP Addresses in Cloudflare

Cloudflare provides a feature to whitelist IP addresses, allowing them to bypass security features. You’ll need to add Wordfence’s IP addresses to this whitelist:

65.39.128.0/17
64.119.96.0/19
198.143.32.0/19
74.60.0.0/16
50.31.128.0/18

Log in to your Cloudflare account, go to the Security tab, and click on IP Firewall. Then, click on IP Access Rules and select Create IP Access Rule. Enter the IP addresses above, one by one, and set the Action to Whitelist.

Step 2: Configure Cloudflare’s Rate Limiting

Cloudflare’s rate limiting can also cause issues with Wordfence scans. You’ll need to configure the rate limiting feature to allow Wordfence’s scans to complete:

Log in to your Cloudflare account, go to the Security tab, and click on Rate Limiting. Then, click on Create Rate Limiting Rule and set the following:

  • Rule Name: Wordfence Scan Allowance
  • Select Specific URL and enter wp-admin/admin-ajax.php
  • Set the Requests per period to 1000 and the Period to 1 minute

Step 3: Configure Wordfence Scan Settings

Wordfence provides scan settings that can help mitigate the issue. You’ll need to adjust the scan sensitivity and timeout settings:

Log in to your WordPress dashboard, go to the Wordfence tab, and click on Scan. Then, click on the Scan Settings tab and adjust the following:

  • Scan Sensitivity: Set to Low or Medium to reduce the number of requests made during the scan.
  • Scan Timeout: Set to a higher value, such as 300 seconds, to give the scan more time to complete.

Step 4: Run the Wordfence Scan Again

After configuring Cloudflare and Wordfence settings, run the Wordfence scan again. If the scan still stops, try increasing the scan timeout further or adjusting the rate limiting rules in Cloudflare.

Troubleshooting Tips and Variations

In some cases, the above steps might not resolve the issue. Here are some additional troubleshooting tips and variations to consider:

Varying Cloudflare Plans

Cloudflare offers different plans, including the free plan, Pro, Business, and Enterprise. If you’re using the free plan, you might need to upgrade to a paid plan to access more features, such as custom rate limiting rules.

Using Cloudflare’s Whitelist IP Address Feature

Cloudflare provides a feature to whitelist IP addresses for specific domains. You can use this feature to whitelist Wordfence’s IP addresses for your specific domain:

api.cloudflare.com/v4/user/ip_firewall/whitelist

Make a POST request to the above API endpoint with the Wordfence IP addresses and your domain information.

Using a Third-Party Solution

If you’re still experiencing issues, consider using a third-party solution, such as MalCare, to scan your website for malware and vulnerabilities. These solutions often have built-in compatibility with Cloudflare and can help mitigate the issue.

Conclusion

Resolving the Wordfence scan stopping issue when using Cloudflare requires a combination of configuring Cloudflare’s security features, adjusting Wordfence’s scan settings, and troubleshooting. By following the steps outlined in this article, you should be able to resolve the issue and ensure your website remains secure. Remember to regularly update your Cloudflare and Wordfence configurations to ensure continued compatibility.

Cloudflare Plan Features Whitelist IP Addresses Custom Rate Limiting
Free Limited
Pro Standard
Business Advanced
Enterprise Customizable

Remember to regularly update your Cloudflare and Wordfence configurations to ensure continued compatibility.

Frequently Asked Question

Having trouble with Wordfence scan stopping when using Cloudflare? You’re not alone! Here are some frequently asked questions and answers to help you troubleshoot the issue.

Why does Wordfence scan stop when I’m using Cloudflare?

Wordfence scan stops when using Cloudflare because Cloudflare’s security features can interfere with Wordfence’s scanning process. Specifically, Cloudflare’s Web Application Firewall (WAF) can block Wordfence’s requests, causing the scan to stop. Don’t worry, we’ve got a solution for you!

How can I allow Wordfence to bypass Cloudflare’s WAF?

To allow Wordfence to bypass Cloudflare’s WAF, you’ll need to whitelist Wordfence’s IP addresses in your Cloudflare settings. You can find Wordfence’s IP addresses in the Wordfence plugin settings. Simply add these IP addresses to your Cloudflare whitelist, and you’re good to go!

Will whitelisting Wordfence’s IP addresses compromise my website’s security?

No, whitelisting Wordfence’s IP addresses will not compromise your website’s security. Wordfence is a trusted security plugin, and its IP addresses are legitimate. By whitelisting them, you’re simply allowing Wordfence to do its job and scan your website for vulnerabilities. Cloudflare will continue to protect your website from other threats.

What if I’m still experiencing issues with Wordfence scan stopping?

If you’re still experiencing issues with Wordfence scan stopping, try increasing the timeout value in your Wordfence settings. This will give Wordfence more time to complete its scan. You can also try contacting Cloudflare support to see if there are any specific settings that need to be adjusted on their end.

Is there a way to integrate Wordfence with Cloudflare for better security?

Yes, you can integrate Wordfence with Cloudflare for better security! Wordfence offers a Cloudflare module that allows you to enable Cloudflare’s security features directly from within the Wordfence plugin. This integration provides an additional layer of security for your website. Simply enable the Cloudflare module in Wordfence, and you’re all set!

Leave a Reply

Your email address will not be published. Required fields are marked *