Swapping the automatic WordPress cron with a manual job can increase the speed of your website. Scheduled tasks will then run in the background, rather than when a user visits your website.
Disable the automatic cron
The first step is to disable the automatic cron. Log in to your website via FTP and open up the wp-config.php file. Add the following line just above the That’s all, stop editing! Happy blogging line:
define('DISABLE_WP_CRON', true);
Add the manual cron job in the control panel
To create a manual cron job, you’ll need to have access to your hosting control panel. Log into your control panel and find the Cron Jobs section. In cPanel, this is located in the Advanced area.
In the common settings box, choose Twice Per Hour. If you need your scheduled tasks to run more often, change this to Once Per Five Minutes.
In the command box, enter the following, replacing domain.com with your website domain:
wget -q -O - https://domain.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1
The click the Add New Cron Job button.
If you don’t have access to your hosting control panel or if your host does not allow you to schedule your own cron jobs, you can use a 3rd party solution like EasyCron.
Testing the WordPress cron can be done with this plugin.
One thought on “Configure the WordPress cron to run manually”
Comments are closed.