This documentation is only valid for older versions of Wordfence. If you are using Wordfence 7 or later, please visit our new documentation.

LiteSpeed aborts Wordfence scans and updates. How do I prevent that?

From Wordfence Documentation
Revision as of 20:31, 26 May 2016 by WFMattr (Talk | contribs)

Jump to: navigation, search

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.

When using software like Wordfence or backup software that needs a little more time to complete certain tasks, 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.

To prevent this you need to make a very simple change:

  1. Find your site's .htaccess file. This file usually lives in your website root folder. So it may be in a folder like public_html/.htaccess
  2. Open the file with a text editor.
  3. Find the line that says "# BEGIN WordPress" and add this code above it:
# BEGIN litespeed noabort
<IfModule rewrite_module>
        RewriteEngine On
        RewriteRule .* - [E=noabort:1]
# END litespeed noabort

This will tell 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.

Thanks to wwwolf for additional testing.