WordPress how to disable default wp-cron.php behavior

By default WordPress runs its wp-cron.php too frequiently, so to change it:

Update wp-config.php with the following line:

define('DISABLE_WP_CRON', true);

Setup manual cron job for wp-cron.php

Enter user’s crontab

crontab -lu USERNAME

And append command to run cron every 12 hours

0 */12 * * * cd /home/USERNAME/public_html; php -q wp-cron.php

or

0 */12 * * * wget -q -O - https://alltme.pp.ua/wp-cron.php?doing_wp_cron >/dev/null

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *