HostOnNet Blog

Disable WordPress Cron to Reduce CPU Load

wp-cron.php manages all the scheduled events in your WordPress site. WP-Cron is a very common cause of high CPU loads. Disabling WP-Cron can drastically reduce CPU-load and prevent the chances your account is suspended due to exceeding your resources.

By default WordPress is setup to call wp-cron.php everytime someone visits your WordPress website.

To stop this, add this single line to the end of your wp-config.php file:

define('DISABLE_WP_CRON', true);

and then just run it using cron job when according your needs.

Setup Manual Cron Job on cPanel Server

If your site is hosted on a cPanel server, you can create a cron job and run wp-cron.php every hour using the following method.

Login to your cPanel and click on Cron Jobs in the Advanced section at the bottom.
And select Once Per Hour from the common settings and enter the following in the command field.

wget > /dev/null 2>&1


Note : Replace with your domain name.

Posted in Wordpress