22.214.171.124.9. Increased load from wp-cron.php
wp-cron.php — built—in WordPress task scheduler. It can be used to publish deferred posts, check for updates of installed themes and plugins, send notifications, and perform other time—dependent operations. Some of these tasks can be quite resource intensive and can be a source of increased load, in case of too frequent start-up (the frequency of start-ups can be found, for example, from access logs site by filtering records by
wp-cron.php). Configuring the launch of the built-in scheduler via croninstead of launching by means of the site itself.
To reconfigure the launch of the WordPress scheduler:
- Add at the beginning of the file (right after
<?php) a line like this:
- Save your changes.
- Add a cron task with such content (substituting instead
example.comyour site address):
/usr/bin/wget -t 1 -O - 'http://exemple.com/wp-cron.php?doing_wp_cron' >/dev/null 2>&1
It is recommended to set the startup interval within the range from 15 minutes to 1 hour.
- Check the work of the scheduler by scheduling the publication of a record, for example, in 1-2 hours from the current time. If the post is published, then everything is configured correctly.