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

Scan time limit

From Wordfence Documentation
Revision as of 15:27, 4 November 2016 by WFMattr (Talk | contribs)

Jump to: navigation, search

You can set a limit for how long Wordfence scans will run on your site. Some options combined with a large number of files can make scans take a long time, especially on slower servers. Leaving this option blank will allow Wordfence to use the default limit. If your site reaches this limit during a scan, you will see a message in the scan results like:

Scan terminated with error: The scan time limit of 10800 seconds has been exceeded and the scan will be terminated. This limit can be customized on the options page.

If this happens, then the scan stops and reports the issues it has found so far, but the remainder of the scan will not be able to run unless you make some changes to scan options or the site's files.

Resolving the issue

You can adjust some options to help scans complete more quickly, look for reasons that might cause the long scans, or increase the time limit, as described below.

Scan images, binary, and other files as if they were executable

This option can be disabled if you have many non-PHP files being scanned. This option is off by default, but you may have enabled it on your site.

Exclude files from scan that match these wildcard patterns

You can add files, directories, or patterns to the "Exclude files from scan that match these wildcard patterns" box on the options page, to prevent them from being scanned. This can be useful if you keep large files within your site's folders, such as backups.

Additionally, we recommend saving backups somewhere other than in your site's own folders. In addition to saving time in scans, if the the host had a major problem with the server and the whole site was lost, it is best to have your backups stored somewhere else.

Scan files outside your WordPress installation

If you have "Scan files outside your WordPress installation" enabled, you can disable it to scan fewer files. If you have additional non-WordPress applications installed, or additional sites in subdirectories of the main site (such as on some shared hosting plans), they will not be scanned if this option is disabled. If the additional sites also run Wordfence, their scans will still run normally.

Error logs

Check the error logs generated by your site. It's possible that a conflict with another plugin, a database issue, or settings on the server may be interfering with the scans, causing them to take longer than they should.

Time limit that a scan can run in seconds

You can set this option to a longer duration, if you want scans to run for a longer time. Many hosts have limits on resource usage, especially on shared hosting plans, so it is generally best to reduce usage rather than increasing the limit.

See also: Time limit that a scan can run in seconds (Wordfence options)