Before setting up the WordPress cron, it is beneficial to understand what job the cron performs.
Crons are used to execute processes at certain intervals - for example if you've written a WordPress post that you would like to be published say first thing tomorrow morning, when that time comes around, the cron will do that process for you.
WordPress does have a built in process that runs the cron every time someone visits your website, however, this method is deemed insufficient if sadly your website doesn't attract many visitors, or alternatively, your website has lots of visitors and therefore the cron is being executed unnecessarily too often.
The following explains how to disable the built in WordPress cron and then add a more reliable cron process.
Disable the old WordPress Cron
Log into your cPanel account. If you are unsure on how to do this, please view the following help article - 'How to log into cPanel'.
Scroll down to the 'Files' section and choose 'File Manager'.
The file manager has access to all of the files on your server, including your WordPress files which is where we need to edit the wp-config.php file in order to disable the old WordPress cron.
Using the left directory listing, open the 'public_html' folder and then click onto the folder that contains your WordPress installation.
Once in the WordPress folder, locate the wp-config.php file and mouse click onto it.
Choose 'Edit' from the top menu.
Open the file in the text editor by selecting 'Edit'.
Add the following line to your wp-config.php file below the opening <?php tag.
Save the changes by selecting the 'Save Changes' option.
The old WordPress cron is now disabled.
Create the New WordPress Cron
In cPanel, scroll down to the 'Advanced' section and choose 'Cron Jobs'.
If you would like to receive an email each time your cron runs, you can do so by entering your email address in the 'Email' section. You may find this useful to begin with to verify that your cron is running.
To setup the cron, in the 'Add New Cron Job' section, you need to define when the cron needs to run and what command the cron is executing.
Take advantage of the 'Common Settings' for when the cron needs to run by opening the dropdown menu. If there's not one that suits your needs, enter the settings accordingly using the minute, hour, day, month and weekday options.
HostPresto will be launching a European point of presence in the coming weeks, specifically in Amsterdam. For customers needing their data located within the EU still please contact support to request migration to this location with ticket subject ‘EU Migration’. We will ensure this is actioned well before the Brexit...
Should the UK leave the EU without a deal, or should a deal be agreed that does not include a provision for .eu ownership by UK entities, it’s highly likely that the EU will revoke any .eu domain names unless you can provide an EU address. While this won’t happen...
If you own a .co.uk domain name and you have not registered the equivalent .uk version, you have until the 25th June 2019 to register the domain and secure your brand. After this date any unregistered .uk domain will enter public availability – meaning anyone can register the domain. You...