Suggestions:
If Your Site Is HackedTuning Wordfence Resource UsageV3: Accessing and Consuming the Vulnerability Data FeedAPI CallbacksVulnerability Management: Webhook NotificationsBasic Plugin SettingsAudit LogV1: Accessing and Consuming the Vulnerability Data FeedV2: Accessing and Consuming the Vulnerability Data FeedWordfence IntelligenceCompatibilityWordfence Intelligence Webhook NotificationsWordfence ResponseWordfence CareWordfence FreePlugin / Theme ConflictsUsing Wordfence Central TeamsSub-Processors ListMySQLi storage engineAccount and Billing HistoryUsing Central’s Settings pageLogin Security PluginLogin Security OptionsLegacy Two-Factor AuthenticationUsing Wordfence plugin options TemplatesUsing the Configuration pageViewing scan FindingsUsing the Dashboard pageSetting up two-factor authenticationConnecting your sites to Wordfence CentralWordfence Central ToolImport/ExportWordfence and GDPR – General Data Protection RegulationTroubleshootingTechnical DetailsWordfence 7Blocking TroubleshootingWordfence and LiteSpeedDiagnosticsWHOIS LookupBrute Force ProtectionStatisticsGlobal OptionsWordfence APIAlertsDashboardToolsRate LimitingChangelogScan TroubleshootingFirewall Optimization TroubleshootingScan ResultsConstantsTroubleshootingLicense KeyRemove or ResetSystem requirementsScan SchedulingCountry BlockingScan OptionsFirewall OptionsFirewall Learning ModeAdvanced information and configurationIncident Response ServicesTwo-Factor AuthenticationReal-Time Live TrafficScanBlockingWordfence PremiumOptimizing The FirewallWordfence Web Application Firewall (WAF)

Wordfence and LiteSpeed

The LiteSpeed web server has been known to kill or stop processes that take more than a few seconds to run. It does not stop these processes gracefully but simply kills them silently. This guide outlines how to prevent this.

If LiteSpeed aborts Wordfence scans and updates

The LiteSpeed web server has been known to kill or stop processes that take more than a few seconds to run. It does not stop these processes gracefully but simply kills them silently. This is intended to save resources when a visitor or bot disconnects before PHP has finished running, but it can stop necessary code from running.

When using software like Wordfence that does some work in the background, or backup software that needs a little more time to complete certain tasks, then this can lead to problems. If you are using Wordfence’s auto-update feature, this may lead to your site becoming unusable, if LiteSpeed kills an upgrade halfway through copying files. It can also cause Wordfence scans or WAF rule updates to fail.

To prevent this you need to make a simple change:

Find your site’s main “.htaccess” file. This file usually exists in the document root directory where WordPress is installed. Open the file with a text editor. Find the line that says “# BEGIN WordPress” and add this code above it:

# BEGIN LiteSpeed noabort
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=noabort:1]
</IfModule>
# END liteSpeed noabort

This will instruct LiteSpeed to not abruptly abort requests. It should allow your site to update correctly, allow Wordfence scans to run to completion, and it will also allow any backup plugins on your WordPress site to function without problems from timing out.

In some cases, depending on the server configuration, the above code may not help. Alternative code blocks that may work are:

# BEGIN LiteSpeed noabort
<IfModule Litespeed>
RewriteEngine On
RewriteRule .* - [E=noabort:1]
</IfModule>
# END liteSpeed noabort

Or:

# BEGIN LiteSpeed noabort
SetEnv noabort 1
# END liteSpeed noabort

Bypass the LiteSpeed “noabort” check

If you are certain that your hosting provider uses LiteSpeed and that the “External Application Abort” function is set to “No Abort” then you can enable this option so that Wordfence will skip checking for “noabort” in your site’s “.htaccess” file. For more information see the global Wordfence option Bypass the LiteSpeed “noabort” check.