Skip to content

WordPress cron on Enhance servers

Enhance does not always detect every WordPress installation, so some sites can be missed. cPFence’s Disable WordPress cron setting (on by default) turns WP-Cron off on every installation daily, so all sites run the same way. Server cron is faster and more reliable than WP-Cron, which only runs when visitors load pages.

If you turn this setting off, cPFence turns WP-Cron back on for all sites daily. To keep WP-Cron on for one site only, exclude it from AutoShield and apply Enable WordPress Cron to it. Enhance may still turn it off again.

To make sure scheduled posts, plugin tasks and WordPress automatic updates run on every site, including any Enhance missed, add this line once to root’s crontab (crontab -e as root) on each server that hosts WordPress sites. Do not add it per website.

0 * * * * /usr/bin/cpfence --bulk-run-due-wp-cron -y

It runs every hour and only runs tasks that are due.

  1. Open WordPress Management, choose the servers and select the affected sites.
  2. Open Choose action → Bulk tools, search for WordPress Cron, then choose Run due WordPress Cron and confirm.

Bulk tools search showing Enable WordPress Cron, Disable WordPress Cron and Run due WordPress Cron

Run due WordPress Cron runs tasks that are due now. Select the image to view it full size; use your browser’s Back command to return.

Or, from a root terminal on the server, for all its sites:

Terminal window
cpfence --bulk-run-due-wp-cron

If a site’s tasks still fail, check its output for a broken plugin.