I often get this

I often get this kind of stuff...

Warning: set_time_limit(): Cannot set max execution time limit due to system policy in [Moderated]/mlaure/wp-content/plugins/wp-defender/app/module/scan-module/component/class-wd-scan-api.php on line 198
... or line105... and this on almost all my sites..l ????

    Sajid

    Hello Mlaure,
    Hope you are doing good today

    This is required for WP Defender plugin to run all its scripts. Since it requires a good amount of server resources (depending on your site size) so it attempt to increase the time limits to finish the process.

    But some servers, does not allow increasing time limits locally. That causes such errors.

    Since these warnings does not effect/break plugin functionality so you can just make these warnings go away by setting WP_DEBUG to false in wp-config.php file.

    Open up wp-config.php file, find the below code:
    define( 'WP_DEBUG', true );

    With following code:

    // Enable WP_DEBUG mode
    define( 'WP_DEBUG', true );
    
    // Enable Debug logging to the /wp-content/debug.log file
    define( 'WP_DEBUG_LOG', true );
    
    // Disable display of errors and warnings
    define( 'WP_DEBUG_DISPLAY', false );
    @ini_set( 'display_errors', 0 );

    This will hide notices/warnings from your site but still log in debug.log file located in wp-content folder.

    It is not only good for this plugin, but also recommended to turn these off because such warnings reveals critical security information that can be used to hack your site.

    Take care and have a nice day!

    Best Regards,
    Sajid - WPMU DEV Support