How to Disable WP-Cron in WordPress

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.

define('DISABLE_WP_CRON', true);

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.

define('DISABLE_WP_CRON', false);

Wrap up

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.


Tags: |

Deepanker Verma is the founder of Techlomedia. He is a tech blogger, developer and gadget freak.

Similar Articles


Leave a comment

Comment policy: We love comments and appreciate the time that readers spend to share ideas and give feedback. However, all comments are manually moderated and those deemed to be spam or solely promotional will be deleted.

2020 UseThisTip | Part of Techlomedia Internet Pvt Ltd Developed By Deepanker