Defender freezes on all my sites

Hi, I have installed Defender on about 10 of my websites, both single and multi sites. The sites are on 3 different shared servers: Hostway, Godaddy and M6. I ran the scan on all of them; none of them finished. The scan always freezes at various percentages.

Pls advise.

  • Chris
    • Site Builder, Child of Zeus

    Update: yes and no. Just installed on another website (same server), also installed the code snippet in wp-config, started scan but it has been ‘initializing’ for the last 10 minutes.

    So, not yet resolved.

    Any more wisdom?

  • Kasia Swiderska
    • Support nomad

    Hello Chris,

    Is this happening on site where access is enabled or this is different one? I’ve tested scanning where access was enabled and it was working.

    If I wasn’t checking right site then please enable debug log on the one it doesn’t work – this should show error that is preventing scanning from working. To enable it, open your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to:

    define(‘WP_DEBUG’, true);

    In order to enable the error logging to a file on the server you need to add yet one more similar line:

    define( ‘WP_DEBUG_LOG’, true );

    In this case the errors will be saved to a debug.log log file inside the /wp-content/directory.

    Depending on whether you want your errors to be only logged or also displayed on the screen you should also have this line there, immediately after the line mentioned above:

    define( ‘WP_DEBUG_DISPLAY’, false );

    The wp-config.php is located in your WordPress root directory. It’s the same file where the database configuration settings are. You will have to access it by FTP or SFTP in order to edit it. I would need then to see contents of the debug.log file – so please paste it to the text file and attach to post or upload to service like dropbox and paste link here.

    kind regards,

    Kasia

  • Chris
    • Site Builder, Child of Zeus

    Hi Kasia, sorry for late reply but your plugins kept me quite busy as one site after the next crashed…! In addition one of my sites, with WP-Defender installed, got hacked today!

    Anyway, I reinstalled that website and then tried to run a scan. I had installed the snippet define( 'WD_CHUNK_FILESIZE', true ); in wp-config but still it initialised forever, until I killed the process (BTW: Defender then gave me the cheerful message ‘Congratulations! Everything is just fine. and: 0 issues found’ even though the scan had not even taken place! Wouldn’t it be better if the message would say ‘Last scan didn’t finish’ or similar??? Just sayin’.

    I have now also added the 3 debug snippets to my wp-config file and I have given you support access. The site is http://afca.coffee/conference/

    I am trying to run the scan again as we speak, but again it’s initialising forever…

    Kindly look into this and advise.

  • Kasia Swiderska
    • Support nomad

    Hello Chris,

    Thanks for the access (we usually see it granted to site that is related to the thread, so we can miss access to another site).

    I can definitely see this issue on your site – does debug.log was generated maybe? If yes could you share here it content (use txt file to add it or upload it to dropbox like service and past here link). I will ping Hoang Ngo to check your site.

    kind regards,

    Kasia

  • Mike Wiesman
    • WP Jockey

    I have run into this exact same issue on my site.

    I have bumped up the execution time to 240secs and the memory is set to 1gig.

    Tried uninstalling the plugin entirely to kill the process and I can’t even uninstall. So I changed the folder name, then refreshed the plugin page, renamed it back. (this is the only way that I can start a new scan after past ones have paused.)

    The site used to run fine with 128MB and 60sec of execution time. Any insight would be awesome. As I have a good 10 hours into this already. I have also allowed access to the site in the support tab.

  • Chris
    • Site Builder, Child of Zeus

    Hi Kasia, so sorry for my long silence, but this and other issues kept me busy…

    I have just now granted you access to my site again.

    I am again trying to run a scan, and, again, it froze @ 25%… I am afraid that, if I have automated scans enabled, it will affect my server resources!

    Pls investigate further.

    Thanks.

  • Nithin
    • Support Wizard

    Hi Chris,

    Hope you are doing good today. :slight_smile:

    I checked your website, and could see that the scan is stuck. Could you please try increasing your memory_limit, and max_execution_time to a greater value, and check whether it works. You’ll have to place the following code in your php.ini located in your root directory(location depends upon your host). For eg:

    upload_max_filesize = 60M
    post_max_size = 120M
    memory_limit = 512M
    file_uploads = On
    max_execution_time = 180

    You can find more info about defining your php.ini file here: https://premium.wpmudev.org/blog/increase-memory-limit/

    If that didn’t resolve, could you please enable debug mode, to enable it, open your wp-config.php file located in your root directory, and look for define(‘WP_DEBUG’, false);. Change it to:

    define('WP_DEBUG', true);

    In order to enable the error logging to a file on the server you need to add:

    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );

    Once enabled, please share your debug.log located inside your /wp-content/ folder in your next reply. Please do note to attach the file in txt format.

    I hope this helps. Have a nice day. :slight_smile:

    Kind Regards,

    Nithin

  • Chris
    • Site Builder, Child of Zeus

    My immediate issue: as soon as I click on Scan in the sidebar Defender menu, the scan seems to start (and freeze). If I click on Cancel Scan, it continues to ‘initialize’.

    How can I stop the scan, pls?

  • Chris
    • Site Builder, Child of Zeus

    Update: I network-deactivated the plugin, hoping this would stop the scan. Then I network-activated it again, went to the Defender dashboard – and immediately the scan started again, without staring it manually.

    BTW: I had meanwhile tweaked my user.ini (Godaddy recommends instead of php.ini) file as suggested.

  • Kasia Swiderska
    • Support nomad

    Hello Chris,

    I’ve pinged developer to check your site where scanning cannot be cancel, because at the moment I don’t see other way except disabling plugin entirely :slight_frown:

    Did you have chance to enable debug log? Can you share debug.log here (past it to text file and attach to post)?

    kind regards,

    Kasia

  • Kasia Swiderska
    • Support nomad

    Hello Chris,

    Got feedback from developer – to stop scan you need to first disable Automated Scans and then you will be able to cancel scan that is initializing. I did that on your site where access was enabled and stopped scan.

    Please try this on your other sites and let me know how it goes.

    kind regards,

    Kasia

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.