Defender plug in issue

Hi, this website is having an issue with defender. It flags up a report that says "You 6 files needing urgent attention!". Then beneath that warning it says "Wordpress Core Integrity - 6 issues" then a button that says "Fix Issue". When I click the button it loads another page that says "Your server resource usage is too close to your limit. Please try again in 15 minutes." It does this no matter what time of day I try it. It also gives the same error if I try to "Run New Scan". I don't see how the server resource can be too close to it's limit though, as I have a number of wordpress installs for different domains on the same server. All of them are purring along like a troupe of kittens. Can you point me in the right direction please? Maybe at least to the 6 files that have an issue please?

  • Jude
    • DEV MAN

    Howdy Barnaby

    Hope all is well !

    The sites may run great for users, but for Defender the resources needed is slightly higher. You can increase the memory allocated to WP as shown here ( set to something like 512 MB )

    https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP

    Or you can manually download a fresh copy of WP from her and replace just those 6 files via FTP
    https://wordpress.org/download/

    Cheers
    Jude

  • Barnaby
    • Site Builder, Child of Zeus

    Hi Jude,
    Thanks very much for your reply. I had wp-config set using 200M for wp_memory_limit, so changed it to 512M but to no avail. How can I find out which 6 files are corrupted, does Defender create a log of the files somewhere?
    Thanks again,
    Barnaby

  • Ivan Shulev
    • The Bug Hunter

    Hey Barnaby ,

    I hope you are having a nice day so far!

    I had wp-config set using 200M for wp_memory_limit, so changed it to 512M but to no avail.

    By looking at your system info, through the dashboard plugin, I can see that the PHP memory limit is 256M, so regardless of what you try setting in your wp-config, it will not go above that value.

    Also, since Defender is working in the admin, the value you should be looking at is the WP_MAX_MEMORY_LIMIT variable, which is set to 256M on your server.

    How can I find out which 6 files are corrupted, does Defender create a log of the files somewhere?

    I don't believe there is a log for you to look at, but I will ask one of the developers for a way to see them.

    In the meantime, please try the suggestion by my colleague Jude and replace the core files with a fresh download from wordress.org.

    I don't see how the server resource can be too close to it's limit though, as I have a number of wordpress installs for different domains on the same server.

    The scan is quite resource intensive and if the combined requirements of all your sites requires 40%, then topping 55% is easily achievable with Defender scan on (above 55% intensity is when you get the limit message).

    I would suggest contacting your hosting provider and asking them about recent spikes and maybe do a scan while communicating with them so they can monitor what is happening live.

    I hope this helps and I wish you an awesome day ahead!

    Ivan

  • Barnaby
    • Site Builder, Child of Zeus

    Hi Ivan,
    I have replaced the Wordpress core & that seems to have got rid of the alert about the files.
    However the scan still won't run, I'm having discussions with the host & I will be in touch, if that gets us anywhere.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.