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

My scans don't finish. What would cause that?

From Wordfence Documentation
Revision as of 17:51, 30 August 2015 by WFMattr (Talk | contribs)

Jump to: navigation, search

The following solutions have worked for some users:



Adjusting the max execution time

Go to wordfence “options” page
Scroll to the bottom Set “Maximum execution time for each scan stage” to 15 seconds. Don’t forget to “Save”.
Try another scan.
If the scan does not complete, try this instead:
Go to the bottom of Wordfence “options” page.
Click the option to view your configuration.
Look for max_execution_time
Set the “Maximum execution time for each scan stage” to about 80% of that value. So if it’s 90, try setting the option to 75.
Try another scan and see if that works.

Explanation: Wordfence scans run for a few seconds up to several minutes. Most web servers don’t allow processes that run for several minutes. So the way we get around that is that we start a scan, and then after “Maximum execution time for each scan stage” we pause the scan and launch another process and pick up where we left off. We try to auto-detect what the max execution time should be for your server, but sometimes we get it wrong. So we've added this advanced config parameter to allow you to tell us how long a process should be allowed to run on your server.
When you set this value, you must make sure it’s not greater than the maximum execution time that PHP allows. That is the value set in “max_execution_time”. If your web host has set an Apache config variable that limits process execution time or if they have a “killer daemon” that kills long running processes, you also need to make sure that your “Max execution time” is shorter than the max process time that these allow.
However, you don’t want to set this value too low because it will increase load on your server as Wordfence pauses and restarts every time it hits the time limit. So the trick is to find a happy medium. Often this seems to be around 15 seconds, so try that first.

Scan process ended after forking

If you get the 'Scan process ended after forking' check and make sure you have not blocked the wp-admin folder with a .htaccess file or limited access to it for the same. Make sure and allow your server's IP address access to this folder. Shout out to Mike S who helped find this one!.

LiteSpeed web server settings

If your site is running on a LiteSpeed web server, you will need to adjust settings to prevent the server from aborting long scans:

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