How to Disable/Enable WordPress Cron

Disable/Enable WordPress Cron

By default WordPress virtual cron is enabled. If you are not using any cron or plugin which requires this feature, it is recommended to disable WordPress cron. This will reduce the resource usage for your website and server. In this article, we will explain how to Disable/Enable WordPress cron.

How to Disable the WordPress cron

To disable WordPress cron job system, You just need to add one line as follow in your wp-config.php file. This file should be available in the root of your WordPres installation. Find the following line in your wp-config.php:

define('DB_COLLATE', '');

Add the following line after the above line:

define('DISABLE_WP_CRON', true);

How to Enable the WordPress Cron

To enable the WordPress cron again, you just need to set false tag for DISABLE_WP_CRON as follow:

define('DISABLE_WP_CRON', false);

If you have cPanel or other hosting control panel, you can modify wp-config.php file using file manager.

If you are not using WordPress cron feature, you should still call wp-cron.php on a regular interval (i.e. once in an hour). This cron is useful to check for WordPress updates, plugins update, theme updates. Also, if you are using backup plugin, you will require to execute cron task.

If you are using cPanel, you can set a cron job from your cPanel by following the below steps:

[1] Login to your cPanel control panel.

[2] Go to “Cron Jobs“.

[3] Set your cron time from Common Settings or you can adjust custom value and set the following command:

We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it. Bear in mind that some of the links in this website are affiliate links and if you go through them to make a purchase I will earn a commission.Ok