WP Defender causing max execution times and memory limits

WP Defender ever since install has not completed the initial scan. I have read though the forums and this is just about exactly the same issues that i have been having.

The initial issue was that the backend of WordPress would not load - just a blank screen. Then it turned into the entire site not loading - all white screens.

After disabling each plugin one at a time, the one that made the site work again was deactivating WP Defender. (I had to do this by changing the plugin folder name, as I could not deactivate via the plugins page within WordPress because when I would, It would load yet another......you guessed it, white page.

So, I have done these repeated steps of uninstalling, deactivating, reactivating while increasing the memory limits and max execution times and am now up to 240secs for max execution time and 1 gig of memory and am still hitting those.......there is something wrong with this.

I have allowed support access. Thanks ahead of time.

  • Nithin

    Hi Mike Wiesman,

    Hope you are doing good today. :slight_smile:

    I checked your website, and I could see the memory is still 256M, since you did mention as increasing your memory limit to 1G, this could be the default memory defined in WordPress.

    You can increase the memory allocated to WordPress by going to wp-config.php file located in your WordPress root directory, and adding the following line:

    define( 'WP_MEMORY_LIMIT', '512M' );
    define( 'WP_MAX_MEMORY_LIMIT', '1000M' );

    Please make sure to add these before the /* That's all, stop editing! Happy blogging. */ line. You can find more info about editing your wp-config.php file here. If it's about increasing your PHP memory limit please check this link for more info: https://premium.wpmudev.org/blog/increase-memory-limit/

    Please let us know how that goes, so that we could give a closer look. Have a nice day. :slight_smile:

    Kind Regards,
    Nithin

  • Mike Wiesman

    I have done this too. I'm still hitting memory limits. How do I entirely remove the defender plugin and it's database info?!? I just want to start all over. Whenever I try to deactivate Defender the site spikes and hit the memory limit.

    Give it a try for yourself if you would like. I cannot get Defender out of it's initial scan loop, it's just stuck there even if I ftp remove the plugin folder all together.

  • Nithin

    Hi Mike Wiesman,

    I'm afraid, I still don't see any changes made to the memory limits, you can check your systems memory_limit defined under WPMU DEV > Support > System Info of the dashboard plugin, it's still the same? Could you please confirm whether you have made the above changes as suggested? Please advise if I'm missing something.

    To increase your PHP memory limit, you'll have to add a php.ini or php5.ini depending upon your host, inside your /wp-admin folder as described here: https://premium.wpmudev.org/blog/increase-memory-limit/
    For Eg:

    upload_max_filesize = 64M
    post_max_size = 96M
    memory_limit = 1024M
    file_uploads = On
    max_execution_time = 180

    You'll also have to define the WP_MAX_MEMORY_LIMIT & WP_MEMORY_LIMIT to your desired values as described in previous thread.

    If you have already followed these settings, and still the values show the same, it would be a plugin which might be overriding these values. Would recommend disabling all the plugin, and see whether it makes a difference. Pleas let us know if you still have any issues settings these up, have a nice day. :slight_smile:

    Kind Regards,
    Nithin

    • Mike Wiesman

      Yes, if you check the wp-config.php file you will see:

      define('WP_MEMORY_LIMIT', '512M' );
      define('WP_MAX_MEMORY_LIMIT', '1024M' );

      But in the Support System Info, it is not changing at all. The php.ini file for the server is also set the same. It appears that something is overriding the settings that I am changing. Please advise.

      Ok, had the two lines of code too far down in the wp-config.php file. I moved them up and now it is showing the correct increased amount of memory. But, I am experiencing the exact same issues and the defender scan is still stuck at 5% and my site load times have increased by 14-20 seconds because it's eating up so much........please advise.

  • Rupok

    Hi Mike Wiesman, hope you had a wonderful day.

    I believe you already did this, but can you please confirm you followed the solution Kasia Swiderska provided here?

    Thanks for granting Support Access. I logged in but I didn't find WP Defender installed. I think, you uninstalled it for the problem, but it's kinda impossible for us to troubleshoot the issue if we can't see it live on your site. If your site is a LIVE site and it's not a good idea to activate and troubleshoot the issue there, can you please make a staging site on the same server or same configuration so we can test it there, troubleshoot and try to fix it for you? When we find the solution in staging site, you can then deploy it in your live site.

    What do you suggest? I'm looking forward to hear from you and resolve this issue as soon as possible.

    Have a nice day. Cheers!
    Rupok

    • Mike Wiesman

      Nithin and Rupok Thanks for your assistance so far.

      Currently I have uninstalled the the plugin, yes. The server kept getting hung on the initial scan and the only way that I could get it out was uninstall it entirely. I do plan on reinstalling it, don't worry. It works flawlessly on just about all of my other sites, so I don't think it's anything to do with the plugin itself.

      I did have these two lines at the bottom of the wp-config.php file. I moved them up above the line that says "That's it stop editing....." and now the memory is showing that the memory is increased.

      -------fast forward----

      I ended up finding a bunch of missing files (that I deleted from the media library) Well I didn't delete them, I decided not to upload them when I took over the site. I had since forgot to clean up the database. So, long story short. I spent the last two days "Spring Cleaning" that site's media folder and database tables to insure that there wasn't any junk. Well, needless to say the file size of the database has been reduced to 27.1MB from what I started with at 117MB.

      Since the site is already showing a performance increase from the cleaning, I am waiting till tomorrow (Monday) to install further plugins (Defender, Snapshot) and am hoping that this messy database was the reason defender was getting stuck on the scan.

      I will post back here tomorrow how everything is going.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.