Did you know that every time someone visits your site WordPress calls a file – wp-cron.php? Every single time, checking if it needs to do anything. As your site gets more and more visitors WordPress runs this job more and more and can slow your site. You can control this one of several ways:
1. stop the cron job running automatically
You can then run the task using system commands. If you’re running your own server then this should be easy. If you do not have access to the command line there are some great online services that you can use. If your running Plesk you can run a cron job via your control panel (we will be releasing a video on how to do this shortly).
To disable the cron job
Add this line of code to the wp-config.php file to disable the cron job:
2 ‘lock’ the wp-cron file for a set period.
Locking the file will prevent the file from being run again until the time on the lock has expired.
To ‘lock’ the cron job
Enter the code below into your wp-config.php file: