← Tous les articles

Scheduled posts not publishing: fixing WP-Cron

“Missed schedule” on your posts? WordPress relies on visits to run its tasks. Here is how to make it reliable with a real cron job.

Scheduled posts not publishing: fixing WP-Cron

Key points

  • WP-Cron only runs when a visitor loads a page.
  • Heavy caching or low traffic delays or blocks tasks.
  • The reliable fix: stop triggering on visits and call wp-cron.php from a server cron.

You schedule a post for 9am and at noon it still says “Missed schedule”. It is not an editor bug: it is how WP-Cron works, and it is not a real clock.

How WP-Cron works

On each page load, WordPress checks for overdue tasks and, if any, calls wp-cron.php in the background. No visits, nothing happens. And when every page is served from a server cache, WordPress does not even load.

The reliable fix: a system cron

Turn off visit-based triggering in wp-config.php:

define('DISABLE_WP_CRON', true);

Then create a cron job in your hosting panel, every 5 minutes:

*/5 * * * * curl -s https://www.mysite.com/wp-cron.php?doing_wp_cron > /dev/null 2>&1
# or, with PHP CLI available:
*/5 * * * * cd /path/to/site && php wp-cron.php > /dev/null 2>&1

Tasks now run on time, without slowing visitors down.

Spotting stuck tasks

The WP Crontrol plugin lists scheduled events and their next run. A task hours overdue signals a blockage. With WP-CLI, wp cron event list shows the same and wp cron event run --due-now runs what is pending.

Other causes we have seen

  • Password protection (htpasswd) on the site blocks the internal call to wp-cron.php.
  • A firewall or security plugin blocks the server’s requests to itself.
  • The time zone is wrong in Settings → General.

FAQ

Is every 5 minutes too often?

No: when nothing is due, the call finishes in milliseconds.

Does this affect WooCommerce too?

Yes: delayed emails, subscriptions and cleanups all use the same scheduled events.

Facing this on your site? We diagnose and fix it without putting your content at risk.

Partager LinkedIn Facebook X WhatsApp
</>

webtestudio

Agence web : sites WordPress sur mesure, thèmes premium et logiciels SaaS.

Parler de votre projet →