📝 WordPress: Fix WP-Cron Never Firing Behind a Caching Layer
WP-Cron is triggered by default on ordinary front-end page loads, which works fine on an uncached site but breaks down the moment a full-page caching layer or CDN sits in front of WordPress — most visits are now served straight from cache, so the PHP request that would normally trigger wp-cron.php never actually runs, and scheduled tasks like post publishing or a plugin’s cleanup job quietly stop firing until something forces an actual cache miss.
🔎 The Problem
Scheduled post: publish at 09:00
09:00 - 09:47: every visitor request served from CDN cache, PHP never executes,
WP-Cron's pseudo-trigger never fires
09:47: first cache-miss request happens to arrive, WP-Cron finally runs,
post publishes 47 minutes late with no error logged anywhere
âś… Fix: Replace the Page-Load Trigger With a Real System Cron
- Disable the default pseudo-cron trigger with
define('DISABLE_WP_CRON', true);inwp-config.phponce a caching layer sits in front of the site, since relying on an uncached page load to trigger it means it may not fire for long stretches. - Set up a real system cron job hitting
wp-cron.phpon a fixed interval, so scheduled tasks run on a predictable schedule independent of whether a request happens to bypass the cache. - Confirm the cron job’s own request actually reaches WordPress and isn’t itself served a cached response — hit it in a way your CDN is configured to never cache.
🚨 Why This Is Dangerous
- A scheduled post that never publishes, or a plugin’s scheduled security task that silently stops running, can go unnoticed for weeks because nothing about the site visibly breaks — it just slowly drifts out of date.
A cron job that only runs when a human happens to cause a cache miss isn’t scheduled — it’s a coincidence with a cron-shaped name.






