ZeroToWP

WP-Cron

Quick Definition

WP-Cron is WordPress's built-in task scheduler that runs scheduled jobs — like publishing scheduled posts, checking for updates, and sending emails — by checking for due tasks on every page load instead of using a real server cron.

WordPress Developer cron documentation

What Is WP-Cron?

WordPress's pseudo-cron that checks for due tasks on every page load. Powers scheduled posts, update checks, backup schedules, database cleanup, and email sending.

How It Works

  1. Plugin/core registers task with wp_schedule_event()
  2. Saved with timestamp + interval
  3. Every page load checks wp-cron.php
  4. Overdue tasks execute during that request
  5. Task rescheduled for next interval

The Problem

Depends on page loads. Low traffic = late tasks. High traffic = unnecessary DB checks on every request.

Fix: Real Cron

  1. Add to wp-config.php:
    define('DISABLE_WP_CRON', true);
  2. Set server cron every 15 min:
    */15 * * * * wget -q -O - https://yourdomain.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

Reliable schedule + no per-page overhead.

Why It Matters

Fine for most sites. Switch to real cron for high-traffic or e-commerce where scheduled tasks are critical. Fixes missed posts, late backups, and page speed overhead.

Sources: Developer.WordPress.org, Kinsta

Related Terms

Related Articles