
You scheduled a postDynamic, time-based content (e.g., blog entries) displayed i... More for 9 AM. You come back at noon, and it is still sitting in “Scheduled” status. Your weekly backupA copy of your WordPress site's files and database, saved to... More email never arrived. The newsletter queue is stuck. Your analytics data is days old. The culprit is almost certainly the same thing: WordPress’s built-in scheduling system, WP-Cron.
The problem isn’t that WP-Cron is a bad idea. The problem is that it is a pseudo-cron, not a real one. It relies on someone visiting your site to trigger scheduled tasks . If your site is quiet, the tasks simply do not run.
WordPress uses the wp-cron.php file to handle time-based tasks. Every time a pageStatic content (e.g., "About Us," "Contact") not part of chr... More loads, WordPress checks if any tasks are due and runs them. This is clever for shared hosting environments that do not allow real cron jobs, but it comes with significant drawbacks .
When WP-Cron fails, the symptoms are usually obvious: missed scheduled posts (the classic “Missed Schedule” error), pluginSoftware that adds specific features or functionality to a W... More updates that do not happen, automated emails that are never sent, and background processes that simply stop .
Before applying a fix, you need to confirm the cause.
Tools > Site Health in your WordPress adminThe admin (administrator) is the highest user role with full... More. Look for any warnings related to the scheduled event or loopback requests .wp-config.php file and search for define('DISABLE_WP_CRON', true);. If this line exists, WP-Cron is manually turned off .https://yoursite.com/wp-cron.php?doing_wp_cron. A blank pageStatic content (e.g., "About Us," "Contact") not part of chr... More means WP-Cron is reachable. A 403 or connection error means something is blocking it .The only reliable long-term solution is to disable the default WP-Cron and set up a real server-side cron job . This removes the dependency on site traffic.
wp-config.php file in your WordPress root directory./* That's all, stop editing! */ line:define('DISABLE_WP_CRON', true);This step requires access to your hosting control panel (cPanel, Plesk, etc.) or the command line.
Option A: Using cPanel (Most Common)
yourwebsite.com with your actual URL:wget -q -O - http://yourwebsite.com/wp-cron.php?doing_wp_cron > /dev/null 2>&1Option B: Using WP-CLI (Command Line)
For developers with SSH access, this method is cleaner and does not rely on HTTP requests:* * * * * cd /var/www/your_site/htdocs; /usr/local/bin/wp cron event run --due-now > /dev/null 2>&1
This command uses WP-CLI to run due tasks, which can provide better error reporting and doesn’t rely on web server configurations .
Option C: Using PHP-CLI */5 * * * * cd /var/www/your_site/htdocs; php /var/www/your_site/htdocs/wp-cron.php > /dev/null 2>&1
This method uses PHP to execute the cron script directly without making an HTTP request.
If tasks are still stuck, the command line is your best diagnostic tool.
wp cron event list — This shows you what is in the queue, when they are next due, and if any are stuck (next_run_relative will show “now” or “1 hour ago”) .wp cron event run <hook_name> — This forces a specific event to run and outputs any PHP errors directly to your terminal .wp cron event run --due-now — This clears the backlog of all overdue tasks at once .Relying on WP-Cron is a gamble with your site’s functionality. For any site where scheduled tasks are critical, replacing it with a real cron job is not optional. It is a fundamental configuration that ensures your site works the way you expect it to, whether you have ten visitors or ten thousand.