How to Disable Automatic WordPress cron Job

A cron job is a task scheduled to run automatically at specific intervals. For example a cron job to backup files after one week.

WordPress by default, run a cron job called wp-cron.php which runs anytime a page loads. This cron job is not real time. This cron job is however convenient but is has several disadvantages as follows

  1. Running the wp-cron.php file any time a page loads is not very necessary and it can affect the performance of the site especially for sites with very traffic.
  2. Increases load time. A visitor to the site can have slow loading of pages since this cron job is running.

To resolve these issues, you can disable the default virtual WordPress cron job, and configure a real cron job. To do this, follow the procedures below.

  1. Log in to your account using cPanel or SSH.
  2. Using the cPanel File Manager or the command line, open the wp-config.phpfile in a text editor
  3. Add the following line to the wp-config.php file:

define(‘DISABLE_WP_CRON’, true);

  1. Save the changes to the wp-config.phpfile and then exit the text editor. The virtual WordPress cron job is now disabled.

Was this article helpful?

Related Articles

Leave A Comment?