How to empty debug.log when file size is above xyMB?

Sometimes I forget to empty my debug.log file (or that it exists) and after trying to get around a bug, I find it having simply too much content to open it in ex. the basic Windows Text Editor.

Part of my wp-config.php file:

Read More
error_reporting( E_ALL );
define( 'WP_DEBUG',         true );
define( 'SAVEQUERIES',      true );
define( 'WP_DEBUG_LOG',     true ); // file: /core_root/wp-content/debug.log
define( 'WP_DEBUG_DISPLAY', true );

Question: Is there a way to do this via WordPress, or do I have to do it with basic php functions?

Related posts

Leave a Reply

1 comment