Defender scan hanging around 56%

Testing defender on a MS dev project

Scan Hangs at 57.6% (Analyzing wp-content files)

Around 55% it flashes an undefined message prior to moving to 56.7% before it hangs (let run for several hours).

Did the basics, disabling plugins etc.

Tested on another site with same basic configuration (same theme framework, child theme – same basic plugins, same hosting service) and no problems.

Access granted, just in case.

  • Adam Czajczyk
    • Support Gorilla

    Hello Jack,

    I hope you’re well today and thank you for your question!

    Please note that it doesn’t make the difference whether the plugin is enabled or not because Defender scans them at “file level” directly.

    I’ve tested your site and I can confirm that. The scan’s getting stuck at the very same point each time and the only way to make it complete is to cancel it, disable the “Suspicious Code” check on “Defender -> Settings” page and then run scan again.

    As it stops at “/wp-content” content it’s most likely a file of one of the plugins, probably PDF related (e.g. coming from TPDF library) as it’s known to be causing some unexpected issue. This unfortunately includes our own MarketPress an CoursePress plugins in some cases. Our developers are aware of these issues and are working on improving scan. On your setup scan gots stuck on CoursePress files.

    However, I’ve tested Defender scan on my own test setup with a similar set of plugins. On my single site CoursePress doesn’t break scan. The same applies to my Multisite. It seems that except the fact that I’m using different server and PHP version (which shouldn’t be an issue here) the only significant difference I could spot here is a WP memory limit which is set to default 64M on your site and to 256M on my sandbox. That’s definitely worth checking so could you please add following line to your “wp-config.php” file and let me know so I could re-check your site?


    The line should go above the “/*That’s all, stop editing… ” line.

    Let me know after you make that change please!

    Best regards,


  • Jack Alltrade
    • Just A Community Member

    I tried adding the definition, but no good; however, I’ve also tired deleting inactive plugins 1 at a time (I backed them up in case they would be helpful) – I now get to 83.4%. Will continue removing plugins until scan complete, then reapply one at a time and report back to you.

  • Hoang Ngo
    • Code Slayer

    Hi @joat,

    I hope you are well today.

    I’ve just placed a test on your site, the scan went through for me. I think you removed a plugin which prevent it? Can you please let me know what’s plugin so I can take a look.

    Please note that, scan will query all the files belong to your WordPress instance, and analyse theme, even deactivated plugins or themes.

    Best regards,


  • Jack Alltrade
    • Just A Community Member

    Found the culprit.

    Deleted all plugins and reinstalled a couple at a time until I was able to find the plugin; it’s CoursePress.

    I’ve left it installed in case you need any information from the plugin. You still hav e access, so you can delete or add if you need to.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.