Hi @laurahantz55, thanks for your detailed message about your issue.
It is possible, but not the usual case, for the scan to encounter a huge number of files or folders. It could be worth trying to prevent this by deselecting Wordfence > All Options > General Options > Scan files outside your WordPress installation (if it isn’t already.)
You could also ensure max_execution_time = 60
in php.ini, Wordfence’s scan only ever attempts to use half of this value by default.
Your WP_MEMORY_LIMIT
could be set to 128M
or 256M
in wp-config.php. WooCommerce, for example, recommend 64M minimum, so if you also have many hits on the site at once especially during a scan, a lower limit here could be reached fairly easily. Your PHP memory_limit
value could also be adjusted to 128M
or 256M
to accommodate this change.
Failing this, can you please try the following to get me some more information about the scan itself?:
- Stop the existing scan if it is still running (The “Start New Scan” button turns into a “Stop” button while the scan is running).
- Go to your Wordfence > Scan > Manage Scan and locate the “Performance Options” section. Set “Maximum execution time for each scan stage” to 20.
- Click to “Save Changes”.
- Go to the Tools > Diagnostics page.
- In the “Debugging Options” section check the circle “Enable debugging mode”.
- If “Start scan remotely” is checked, uncheck this option.
- Click to “Save Changes”.
- Start a new scan on the Scan page.
- If the scan fails again, copy the last 20 lines or so from the Log (click the “Show Log” link) once the scan finishes and paste them in the post.
On some sites, this will correct the issue. Adding “20” for the “Maximum execution time for each scan stage” tells the scan to pause every 20 seconds and start again where it left off, which makes the scan more performance-friendly for some servers. If this fixes the issue and scans run again, you can leave all the settings above except for “Enable Debugging Mode”.
For a screenshot of my recommended Performance setting options – Click Here.
There are some specific environments where scans could be aborted by the server or other settings might need to be configured. If nothing has helped so far, you can also send a diagnostic report to wftest @ wordfence . com using the link at the top of the Wordfence > Tools > Diagnostics page. Then click on “Send Report by Email”. Please add your forum username where indicated and respond here after you have sent it.
NOTE: It should look as follows – Screenshot of Tools > Diagnostic > Send by Email
Thanks,
Peter.