One of the quickest and easiest ways to reduce your WordPress server load is to disable the built-in, nobody asked for function for wp-cron.
What is it & why do I care?
WP-Cron can be thought of as a housekeeping function that other functions can call, such as plugins or scripts to do different tasks on a scheduled basis.
e.g. Database back ups, sending scheduled emails, update checks, publishing or un-publishing scheduled posts and so on.
So what’s the big deal?
Well, for starters … WordPress triggers this cron each time your page loads – putting unnecessary stress and load on your server as a whole.
Ouch! How do I get rid of it?
Easy, just navigate to your wp-config file in the root of your WordPress installation. Add the following line of code:
/** Disable WP-CRON
This will now disable to cron from executing each time a page is accessed.
Don’t I need this though at some point?
Of course. However, we are going to add in a cron job that runs at a more reasonable interval.
Step 1. Navigate to your web hosting control panel.
Step 2. Find the section that deals with Cron, Cron Jobs, Cron Tasks, Scheduled Tasks or whatever nomenclature that sounds correct for your control panel.
Step 3. Add a new task or job. Set the interval to whatever you want. In most cases you could run this once an hour and be fine.
Add the following line: (for most cpanel servers)
cd /home/<strong>username</strong>/public_html; php -q wp-cron.php
Add this (for most PLESK servers)
cd /var/www/vhosts/<strong>yourdomain.com</strong>/httpdocs; php -q wp-cron.php
The items in bold will be replaced by your specific account or username/domain information for your account.
If you want to see the output of the cron job and make sure it runs without error – you can specify an email address to be notified. This is a good idea for testing and should be removed later to avoid extra email alerts being sent out.