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

  1. Use FTP to access your server and navigate to the public_html folder
  2. Add this line at the bottom of your wp-config.php file
define('DISABLE_WP_CRON', true);

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.

  1. Browse to konsoleH and log in at Admin or Domain level
  2. If Admin level: Select or search for a domain name in the Hosting Services tab
  3. Select Manage Services from the left-hand menu
  4. Select Cronjob Manager
  5. Select Add
  6. Next to Name you may give your cronjob a name e.g. wp-cron
  7. Next to Job enter the following:
    /usr/bin/php-wrapper /usr/www/users/ftpuser/wp-cron.php

    where ftpuser is your FTP username.

  8. The Status option allows you to either have the cronjob Enabled or Disabled.
  9. Under When to execute, set the time(s) when the cronjob needs to execute.
  10. Select Save.