How to fix high server load due to wp-cron.php POST requests
If your site or server is struggling with high load and you notice many wp-cron.php POST requests in the www logs, then the solution is simple: replace the virtual wp-cron with a real cron at your selected schedule.
WordPress has a file called wp-cron.php that runs every time someone visits your site, which can severely throttle CPU usage and slow down busy sites, as this process only needs to run infrequently. You don’t need to have it running in the background that often, using up valuable hosting resources.
Rather than letting wp-cron slow down your site, it should be disabled and let your system handle scheduled processes in the background — using a cronjob.
Disable wp-cron in WordPress
- Use FTP to access your server and navigate to the public_html folder
- Add this line at the bottom of your wp-config.php file
Enable a real cronjob
You can now schedule these wp-crons to run once every couple of hours instead, using the Cronjob Manager in konsoleH.
- Browse to konsoleH and log in at Admin or Domain level
- If Admin level: Select or search for a domain name in the Hosting Services tab
- Select Manage Services from the left-hand menu
- Select Cronjob Manager
- Select Add
- Next to Name you may give your cronjob a name e.g. wp-cron
- Next to Job enter the following:
where ftpuser is your FTP username.
- The Status option allows you to either have the cronjob Enabled or Disabled.
- Under When to execute, set the time(s) when the cronjob needs to execute.
- Select Save.