How to Disable WP-Cron

WP-Cron is responsible for executing scheduled tasks on a WordPress site. Sometimes you might need to disable running WP-Cron on a staging site or even on a live site, if you are in such a situation, you can follow these steps to disable WP-Cron:

Disable WP-Cron in wp-config.php

1- Edit your site’s wp-config.php file and search for this line:
/* That's all, stop editing! Happy publishing. */

2- Then add this line just above it:
define('DISABLE_WP_CRON', true);

That’s it, it will be disabled from running automatically on page load and won’t be fired unless you do that manually by hitting the wp-cron.php file in the browser or any other methods.

Updated on November 23, 2021