Tips & Tutorial

How to Completely Disable WordPress Cron?

Oleh takien

WordPress has ability to schedule posts, so our posts can be published in the future. This feature uses WordPress cron system, not a real cron, but something like virtual cron. Yes, because it use a file called `wp-cron.php` to do this task.  This is useful of course. But, if you don’t need this, you can completely disable it.

All you need to do is add a line of code on your `wp-config.php` that prevent cron to run. Open wp-config.php using your favourite code editor. Find a line contain define('WP_DEBUG', false); and add define('DISABLE_WP_CRON', true); after it and save the file.

define('DISABLE_WP_CRON', true);

Or see the figure below:

So, what happened after you add the code? You can still scheduled post, it it won’t be published. It said missed schedule

Tulisan ini sudah berumur: 10 tahun 6 bulan 25 hari. Informasi di dalamnya mungkin sudah tidak relevan, tapi nilai historisnya sangat berharga, terutama bagi saya sebagai penulisnya.

Tag Terkait: