Title: LH Clear Debug Log by Cron
Author: shawfactor
Published: <strong>May 11, 2021</strong>
Last modified: July 20, 2022

---

Search plugins

![](https://ps.w.org/lh-clear-debug-log-by-cron/assets/banner-772x250.jpg?rev=2529461)

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://ps.w.org/lh-clear-debug-log-by-cron/assets/icon-256x256.png?rev=2529461)

# LH Clear Debug Log by Cron

 By [shawfactor](https://profiles.wordpress.org/shawfactor/)

[Download](https://downloads.wordpress.org/plugin/lh-clear-debug-log-by-cron.zip)

 * [Details](https://wordpress.org/plugins/lh-clear-debug-log-by-cron/#description)
 * [Reviews](https://wordpress.org/plugins/lh-clear-debug-log-by-cron/#reviews)
 *  [Installation](https://wordpress.org/plugins/lh-clear-debug-log-by-cron/#installation)
 * [Development](https://wordpress.org/plugins/lh-clear-debug-log-by-cron/#developers)

 [Support](https://wordpress.org/support/plugin/lh-clear-debug-log-by-cron/)

## Description

The best way of debugging in wordpress s to use the debug.log. But if you leave 
debug running for long periods that log can grow MASSIVELY. This can slow your site
down.

This plugin uses the wordpress cron jobs to empty the debug log once it grows beyond
a certain size.

NOTE this plugin relies on wordpress cron. If that is not working this plugin will
not work. But then you will also have bigger problems!

**Like this plugin? Please consider [leaving a 5-star review](https://wordpress.org/support/view/plugin-reviews/lh-clear-debug-log-by-cron/).**

**Love this plugin or want to help the LocalHero Project? Please consider [making a donation](https://lhero.org/portfolio/lh-clear-debug-log-by-cron/).**

## Installation

Install using WordPress:

 1. Log in and go to _Plugins_ and click on _Add New_.
 2. Search for _LH Clear Debug Log by Cron_ and hit the _Install Now_ link in the results.
    WordPress will install it.
 3. From the Plugin Management page in WordPress, activate the _LH Clear Debug Log 
    by Cron_ plugin.
 4. That is it

## FAQ

### What is the size threshold at which the logs are cleared?

By default the threshold is 4194304 bytes , which is the equivalent of 4 MB. This
thrshold can be changed by using filters.

### What is that filter?

The filter is lh_del_dlog_cron_size_threshold . The only argument is the size threshold
at which the debug log is deleted.

### How do I check if cron is working?

This plugin will help you check: https://wordpress.org/plugins/wp-cron-status-checker/

### What if something does not work?

LH Clear Debug Log by Cron, and all [https://lhero.org](https://wordpress.org/plugins/lh-clear-debug-log-by-cron/LocalHero?output_format=md)
plugins are made to WordPress standards. Therefore they should work with all well
coded plugins and themes. However not all plugins and themes are well coded (and
this includes many popular ones).

If something does not work properly, firstly deactivate ALL other plugins and switch
to one of the themes that come with core, e.g. twentyfirteen, twentysixteen etc.

If the problem persists please leave a post in the support forum: [https://wordpress.org/support/plugin/lh-clear-debug-log-by-cron/](https://wordpress.org/support/plugin/lh-clear-debug-log-by-cron/).
I look there regularly and resolve most queries.

### What if I need a feature that is not in the plugin?

Please contact me for custom work and enhancements here: [https://shawfactor.com/contact/](https://shawfactor.com/contact/)

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“LH Clear Debug Log by Cron” is open source software. The following people have 
contributed to this plugin.

Contributors

 *   [ shawfactor ](https://profiles.wordpress.org/shawfactor/)

[Translate “LH Clear Debug Log by Cron” into your language.](https://translate.wordpress.org/projects/wp-plugins/lh-clear-debug-log-by-cron)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/lh-clear-debug-log-by-cron/),
check out the [SVN repository](https://plugins.svn.wordpress.org/lh-clear-debug-log-by-cron/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/lh-clear-debug-log-by-cron/)
by [RSS](https://plugins.trac.wordpress.org/log/lh-clear-debug-log-by-cron/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

**1.00 May 09, 2021**
 Initial release.

**1.01 June 19, 2022**
 Minor improvements

## Meta

 *  Version **1.01**
 *  Last updated **4 years ago**
 *  Active installations **10+**
 *  WordPress version ** 5.0 or higher **
 *  Tested up to **6.0.11**
 * Tags
 * [clear](https://wordpress.org/plugins/tags/clear/)[cron](https://wordpress.org/plugins/tags/cron/)
   [cron job](https://wordpress.org/plugins/tags/cron-job/)[debug](https://wordpress.org/plugins/tags/debug/)
   [schedule](https://wordpress.org/plugins/tags/schedule/)
 *  [Advanced View](https://wordpress.org/plugins/lh-clear-debug-log-by-cron/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/lh-clear-debug-log-by-cron/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/lh-clear-debug-log-by-cron/reviews/)

## Contributors

 *   [ shawfactor ](https://profiles.wordpress.org/shawfactor/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/lh-clear-debug-log-by-cron/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://lhero.org/portfolio/lh-clear-debug-log-by-cron/)