Disable WP Cron: Disable WordPress Virtual Cron (wp-cron.php)

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 virtual cron (disable wp cron).

Disable WordPress virtual cron (Disabling wp-cron.php)

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);

Once you add the above line, save wp-config.php file. This will disable WordPress virtual cron for your WordPress website.

Enable WordPress virtual Cron (Enabling wp-cron.php)

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.

How to Schedule System Cron

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 - http://yourwebsite.com/wp-cron.php?doing_wp_cron > /dev/null 2>&1

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

cPanel WordPress Cron

This will execute your WordPress cron job on regular interval and it will execute the tasks which are depended on WordPress virtual cron.

Looking for SEO optimized and fast loading WordPress theme? Give a try to WordPress Divi theme.

This Post Has 2 Comments

  1. Ryan

    Thank you! This helped me to reduce the resource usage of our hosting account and now my website is loading much faster than previously. Thank you!

  2. Martin

    My website was using the high resource due WP-cron as it was calling on each request. This helped me to disable WP-cron.php.

Leave a Reply