WordPress Cronjob On Server level

WordPress cronjob checks if there are scheduled tasks to be done. It does on every page load. This can result in a massive resource hog because when your WordPress website is really popular, you can get multiple page loads per second. Every time a page load happens, WP Cronjob runs and checks. 

But it can also work the opposite way. If you have optimized your website with caching system. The cronjob doesn’t load anymore and scheduled tasks won’t run. 

I always turn off the WP cronjob and manage the WordPress cron on a server level. To do this you need to edit the wp-config.php

Add the following line, before the happy blogging line;

define(‘DISABLE_WP_CRON’, true);

Then add the following line to your Linux cronjob

/30 * * * * curl http://mywordpress.com/wp-cron.php?doing_wp_cron > /dev/null 2>&1

When you have web hosting that has an online cronjob editor, I would email support to do this for you. There are too many control panels to specify all the different ways.

Leave a Reply

Your email address will not be published.