Option to take over wp-cron.php
Sometimes on heavier sites or where consistency is desired it is preferable to have wp-cron be run by an actual cron job and disable WP's default of running inside a normal site request. Other panels have the ability to check a box to "take over wp-cron" which automatically creates the cron job and disables WP's cron by adding define('DISABLE_WP_CRON', true) ; to the wp-config.php
It is worth noting a lot of methods online of setting up the cron job do not do so in a performant way. Most guides recommend doing the following:
wget -q -O - https://domain.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1
But this still makes an external request taking up a PHP FPM process, etc. Instead since wp-cli is installed you can do:
wp cron event run --due-now
Which will run all the events that need to be run.
Comments (0)
Replies have been locked on this page!