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.

cPanel Login

[2] Go to “Cron Jobs“.

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

wget -q -O - > /dev/null 2>&1

Make sure that you replace with your exact WordPress site URL.

cPanel WordPress Cron

This will execute your WordPress cron job on regular interval.

Leave a Comment

Your email address will not be published. Required fields are marked *