Skip to content
WilliamAlexander.co
  • Studio
  • Work
  • Services
  • Process
  • Writing
  • Lab
  • About
  • Start a project
  1. Home
  2. Articles
  3. WordPress Cron Jobs: Understanding and Optimizing
WordPress Enterprise

WordPress Cron Jobs: Understanding and Optimizing

Scheduled tasks that keep your site running

May 23, 2026 9 min read

Key Takeaways

  • WordPress cron runs scheduled tasks but only triggers on site visits
  • Disable WP-Cron for page loads and use server cron instead
  • Remove orphaned cron jobs from deleted plugins
  • Monitor cron execution to catch issues early
  • Excessive scheduled tasks can impact site performance
Overview

How WordPress Cron Works

WordPress needs to run scheduled tasks—publishing future posts, checking for updates, sending scheduled emails, running plugin maintenance. Traditional server cron jobs run on fixed schedules. WordPress cron works differently: it checks for due tasks when someone visits your site.

This "pseudo-cron" approach was designed to work on shared hosting where users don't have access to server cron. It's clever but imperfect. Low-traffic sites might have tasks that should run hourly sitting idle for days. High-traffic sites might have cron checks running on every request, adding overhead.

The Core Problem

WP-Cron depends on traffic to trigger. No visitors = no task execution. For sites that need reliable scheduled tasks—especially e-commerce, membership, or publishing sites—this dependency on traffic is a critical weakness.

Tasks

What WordPress Schedules

Core WordPress Tasks

  • Publishing scheduled posts
  • Checking for core, plugin, and theme updates
  • Sending update notification emails
  • Removing old posts from trash
  • Database maintenance tasks

Common Plugin Tasks

  • Backup creation and cleanup
  • Email queue processing
  • Cache cleanup and regeneration
  • Analytics and reporting
  • Security scanning
  • Subscription and membership processing

Potential Problems

  • Missed execution: Tasks not running on low-traffic sites
  • Overlapping execution: Multiple cron runs stacking up
  • Orphaned tasks: Jobs from deleted plugins still scheduled
  • Performance impact: Heavy tasks running during page loads
Optimization

Optimizing WP-Cron

The recommended approach: disable WP-Cron's page-load trigger and use server cron instead.

Step 1: Disable WP-Cron on Page Load

Add to wp-config.php:

wp-config.php php
define( 'DISABLE_WP_CRON', true );

Step 2: Set Up Server Cron

Create a server cron job to trigger WP-Cron regularly. Add to your server's crontab:

crontab bash
*/5 * * * * wget -q -O - https://yoursite.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

Or using WP-CLI:

crontab bash
*/5 * * * * cd /path/to/wordpress && wp cron event run --due-now

Choosing the Interval

  • Every 5 minutes: Good default for most sites
  • Every minute: For time-sensitive tasks
  • Every 15 minutes: For low-activity sites with non-critical tasks

Managed Hosting

Many managed WordPress hosts already optimize WP-Cron. Check with your host before making changes. Some provide control panels for cron configuration. Making duplicate changes can cause issues.
Management

Managing Scheduled Tasks

Using WP Crontrol Plugin

WP Crontrol provides a dashboard for cron management:

  • View all scheduled events
  • See when tasks are next due
  • Identify which plugin created each task
  • Delete orphaned tasks
  • Manually run tasks for testing

Cleaning Up Orphaned Tasks

When plugins are deleted, their cron jobs may remain:

  • Review scheduled tasks after removing plugins
  • Delete tasks that reference missing functions
  • Look for tasks with unfamiliar names

WP-CLI Cron Commands

# List all scheduled events
wp cron event list

# Run all due events
wp cron event run --due-now

# Run a specific event
wp cron event run hook_name

# Delete an event
wp cron event delete hook_name
Troubleshooting

Troubleshooting Cron Issues

Scheduled Posts Not Publishing

  • Check if DISABLE_WP_CRON is set without server cron replacement
  • Verify server cron is actually running
  • Check for cron lock files stuck
  • Test with wp cron event run --due-now

Tasks Running Too Often

  • Review task schedules in WP Crontrol
  • Check for plugins scheduling excessive tasks
  • Look for tasks running every page load (should be scheduled)

Performance Degradation

  • Move heavy tasks off page-load execution
  • Spread tasks across different times
  • Consider whether all scheduled tasks are necessary
Symptom Likely Cause Solution
Scheduled posts not publishing WP-Cron disabled, no replacement Set up server cron
Tasks running late Low traffic triggering Use server cron
Slow page loads Cron running on requests Disable page-load cron
Database full of cron data Orphaned tasks Clean with WP Crontrol
High Traffic

Cron for High-Traffic Sites

High-traffic sites have specific cron considerations.

Concerns

  • Multiple simultaneous cron runs
  • Database locks from concurrent tasks
  • Heavy tasks impacting site performance
  • Cron running on every cached page miss

Solutions

  • Always use server cron, never page-load triggered
  • Implement proper locking for custom tasks
  • Run heavy tasks during low-traffic periods
  • Consider dedicated cron workers for very heavy tasks
Conclusion

Keeping Cron Healthy

WordPress cron is essential infrastructure that often goes unnoticed until something breaks. A few simple optimizations—switching to server cron, cleaning orphaned tasks, and monitoring execution—prevent problems before they affect your site or users.

Take a few minutes to check your cron setup. Install WP Crontrol and review what's scheduled. If you're still running on default WP-Cron, consider the server cron approach. Your scheduled tasks—and your site's performance—will thank you.

Frequently Asked Questions

How is WordPress cron different from server cron?

WordPress cron (WP-Cron) runs when someone visits your site—no visitors, no cron execution. Server cron runs on a fixed schedule regardless of traffic. For reliable scheduled tasks, especially on low-traffic sites, server cron triggering WP-Cron is more reliable.

Can too many cron jobs slow down my site?

Yes. If many scheduled tasks run simultaneously on a page load, it can slow that request. This is why disabling WP-Cron and using server cron to trigger it is recommended—it moves cron execution off the visitor's request.

How do I know what cron jobs are scheduled?

Use a plugin like WP Crontrol to see all scheduled events, their timing, and which plugin created them. You can also run WP-CLI command: wp cron event list. This helps identify orphaned tasks from removed plugins.

Should I disable WP-Cron entirely?

Don't disable it completely—just switch to server-triggered execution. Define DISABLE_WP_CRON as true, then set up a server cron job to hit wp-cron.php regularly. This gives you reliable execution without the page-load overhead.
WordPress Performance Technical Server Optimization
William Alexander

William Alexander

Senior Web Developer

25+ years of web development experience spanning higher education and small business. Currently Senior Web Developer at Wake Forest University.

Related Articles

WordPress Enterprise

WordPress Database Optimization Guide

10 min read
WordPress Enterprise

WordPress Performance Optimization: A Technical Deep Dive

14 min read

Need help optimizing your WordPress infrastructure?

I help organizations tune WordPress for reliability and performance. Let's discuss your WordPress setup.

Let's talk about your project.

Send a few sentences about what you're working on. Start a project →

Practice

  • Work
  • Services
  • Web design
  • Process
  • Start a project

Read & explore

  • Writing
  • Lab
  • About
  • Resume

Elsewhere

  • LinkedIn
  • GitHub
  • Email

Based

Roanoke, Virginia
Working in Eastern Time

Selectively available, Q3 2026

© 2026 William Alexander. Built by hand in Roanoke, Virginia.

Set in Inter and Fraunces. Running on WordPress, hosted on Flywheel.