Wordfence + OpenLiteSpeed / LiteSpeed Cache plugin problems
-
Hello guys, how are you?
I’m trying to clarify and understand two issues related to Wordfence and OpenLiteSpeed.
First, to make things clearer and easier to diagnose, here is my setup:
I’m using an OpenLiteSpeed + WordPress deployment on Google Cloud:
https://docs.litespeedtech.com/cloud/images/wordpress/#__tabbed_1_4—————————-
Issue 1: Advanced Firewall (WAF) behavior on OpenLiteSpeed
The advanced firewall from Wordfence works a bit differently on OpenLiteSpeed compared to more common setups like cPanel with Apache or Nginx.
On cPanel, Wordfence usually configures everything automatically through the Wordfence interface.
With OpenLiteSpeed, manual intervention is required, according to this documentation:
https://docs.openlitespeed.org/config/php/wordfence/However, the path shown in the documentation is not accurate for OpenLiteSpeed.
The real path in my setup is:php_value auto_prepend_file /var/www/html/wordfence-waf.phpHere is a screenshot from my OpenLiteSpeed GUI:
https://ibb.co/hxWKL6zYThe issue is that when I activate Advanced Protection in the Wordfence interface, Wordfence still tries to write code into the
.htaccessfile by default.Here is a screenshot of my
.htaccess:
https://ibb.co/Ggp37XzIn the past, I used to delete this code from
.htaccess. Over the years, while testing and toggling Advanced Protection on and off, I ended up leaving it there.My questions are:
- If this
.htaccesscode is not effective on OpenLiteSpeed, can it cause any problems? - Should I keep it or delete it?
- What is the actual impact of having this Wordfence-generated code inside
.htaccesson OpenLiteSpeed?
—————————-
Issue 2: LiteSpeed “noabort” option
Another thing I’d like to clarify is the LiteSpeed noabort option in Wordfence.
In the Wordfence settings, there is an option called:
“Bypass the LiteSpeed ‘noabort’ check”Since I’m using LiteSpeed, I enabled this option. My question is whether I actually need to enable it or not.
In previous Wordfence scans, I saw warnings related to this setting, which is why I enabled it.
What is the recommended configuration here?—————————-
Issue 3: Main issue – Severe scan performance and admin freezes
I’m asking all of this because of a much bigger issue that I strongly suspect is related to Wordfence working together with:
- OpenLiteSpeed
- LiteSpeed PHP (lsphp)
- LiteSpeed Cache plugin
I’m not sure whether this is related to the
noabortoption or the.htaccessbehavior, but I need to understand what’s really happening.Wordfence scans are extremely intensive, especially when Advanced Protection (WAF) is enabled. Sometimes during scans:
- wp-admin freezes completely
- SSH access shows normal CPU and RAM usage (no overload)
- The backend becomes unresponsive anyway
At first, I didn’t understand why this was happening. I tried enabling the Wordfence option:
“Use low resource scanning (reduces server load by lengthening the scan duration)”However:
- The scan failed due to limits
- Even without limits, the scan took 45 minutes, which is not normal
- I have other identical websites with the same configuration where scans complete in about 15 minutes
On OpenLiteSpeed servers, there is an
idle_childrensetting.
In the past, LiteSpeed support and I reduced this value from 5 to 1 because too many idle children were waiting for connections.I strongly suspect that Wordfence scans, or some Wordfence PHP execution (possibly WAF rules), are conflicting with the server, especially with lsphp, which behaves differently from standard PHP implementations.
What I need help with:
- Identifying exactly what is conflicting
- Understanding why scans take 45 minutes
- Determining whether something is misconfigured in Wordfence
- Whether the
.htaccesscode is contributing to the issue - Whether there are required OpenLiteSpeed or PHP (
php.ini) settings for Wordfence - Maybe cache realted and need to exluded something from the litespeed cache plugin
- Object Cache? maybe problem with Wordfence. (object cache integrated inside litespeed cache plugin.
LiteSpeed support and I have tried many solutions, but we still haven’t found the root cause.
They are fairly confident that Wordfence is part of the problem as well.I must to know if have something you know about your plugin with openlitespeed and litespeed-cache plugin i dont know, if it can be a special setting need to set up inside litespeed cache plugin or the openliteserver.
I would really appreciate your guidance and recommendations.
Regards,
LeviThe page I need help with: [log in to see the link]
- If this
You must be logged in to reply to this topic.