• fly_in_the_sky

    (@fly_in_the_sky)


    Hello,

    I’m having an issue with Wordfence on my WordPress site (hosted on Infomaniak cloud server). Whenever I run a security scan, it consistently fails with the message:
    “The current scan looks like it has failed” or “Timeout reached”. The scan either freezes or stops after a few minutes.

    Here’s what I have already done to try to fix the problem:

    • Verified that Wordfence is up to date (using the free version).
    • Enabled command line mode (WP-CLI) to run scans instead of the default WordPress cron.
    • Disabled WordPress internal WP-Cron (added DISABLE_WP_CRON in wp-config.php).
    • Set up a cron job on the server (Infomaniak) to call wp-cron.php via wget with the correct path.
    • Checked PHP resource limits: increased max_execution_time, allocated enough memory (256 MB or more).
    • Excluded the staging directory from the Wordfence scan to reduce load.
    • Checked for any conflicting plugins.
    • Noticed logs showing a very large number of files (over 430,000) to scan, which could slow or break the scan.
    • Tried IP blocking via Wordfence and .htaccess to reduce external attacks and server load.

    Despite all this, the scan still stops prematurely, and I’m unsure what else to do to get a full scan to complete.

    If anyone has encountered this issue or has specific advice for Infomaniak hosting with Wordfence, I would appreciate your help.

    Thank you in advance!

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support wfpeter

    (@wfpeter)

    Hi @fly_in_the_sky, sorry to see you’ve been having trouble.

    Note that max_execution_time should never be higher than 60, so if you’ve increased it to a higher value than that (or 0, which would be no timeout) then we’d recommend adjusting it back. It may be helpful to see the precise scan stage or message the scan exited with after making that change and following the steps below.

    • Stop any existing scan if it is still running (The “Start New Scan” button turns into a “Stop” button while the scan is running).
    • Go to 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 set “Enable debugging mode”.
    • If “Start all scans 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.

    Many thanks,
    Peter.

    Thread Starter fly_in_the_sky

    (@fly_in_the_sky)

    Hello,

    it’s look like that i have few probleme.

    My cach plugin was collecting 2 000 000 of docs… and it’s was to much for wordfence…

    I have ask wordfence to not analyse this folder and i was putting this : “Maximum execution time for each scan stage” to 20.

    The scan was working, but i still have some erreur this in the log of my serveur ;

    PHP Warning: foreach() argument must be of type array|object, null given in …/wfScanner.php on line 449

    I have that also that : empower-yourself.today [Fri Jun 20 10:52:32.692319 2025] [fastcgi:error] [pid 4077056:tid 140573331678976] [client 82.212.182.168:0] FastCGI: server “/home/clients/d258c2bcfbbebdbca6ed14e8c4ad60ba/.config/apache/empower-yourself.today/.fpm/php5.external” stderr: PHP message: PHP Warning: foreach() argument must be of type array|object, null given in /home/clients/d258c2bcfbbebdbca6ed14e8c4ad60ba/Cedric/wp-content/plugins/wordfence/models/scanner/wfScanner.php on line 449; PHP message: PHP Warning: foreach() argument must be of type array|object, null given in /home/clients/d258c2bcfbbebdbca6ed14e8c4ad60ba/Cedric/wp-content/plugins/wordfence/models/scanner/wfScanner.php on line 449; PHP message: PHP Warning: foreach() argument must be of type array|object, null given in /home/clients/d258c2bcfbbebdbca6ed14e8c4ad60ba/Cedric/wp-content/plugins/wordfence/models/scanner/wfScanner.php on line 449, referer https://empower-yourself.today/wp-admin/admin.php?page=WordfenceScan

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Impossible to make a scan’ is closed to new replies.