How to Disable WP-Cron in WordPress
Cron Jobs are used to performing scheduled tasks. Cron is used to scheduling scripts to run automatically at a specific time or at predetermined intervals. WordPress also uses Cron jobs for several tasks like scheduling a post or checking for updates. Backup plugins also use Cron jobs to run at a predefined schedule.
Cron Jobs in WordPress is handled by WP-Cron (
wp-cron.php). Whenever WordPress CRON handler starts, it slightly impacts the performance of the website. It is worth to note that WP-Cron is not exactly the system Cron job, it just mimics that. It doesn’t run continuously, but it fires on every page load. If your website has high traffic, it will surely impact the load time. If the website doesn’t have much traffic, some CRON tasks could be missed at the scheduled time because no has loaded a page.
A better approach is to disable the WP-Cron and use system CRON. If you do not use any of the features that use Cron, you can also think of Disabling WP-Cron.
How to Disable WordPress CRON
To disable the WordPress CRON Job, open the wp-config.php file located in the root of your WordPress installation. Now locate the line define(‘DB_COLLATE’, ”); in the file. Just below this line, add the following line.
Now WP_CRON will not be executed on each load. If you want to use the WordPress Cron jobs, you can now use system CRON to run wp-cron.php on specific time intervals. You can do that using cPanel that has an easy to use interface for creating Cron Jobs.
If you ever decide to enable the WordPress CRON again, you just need to change the variant from true to false. The line will now be as shown below.
Now you know how to disable WordPress Cron. If you are disabling WordPress CRON, make sure you use system CRON. Otherwise several featured dependent on CRON will stop working.
I hope this article was useful. Do not forget to like our Facebook page and Twitter profile for the latest updates.