WordPress uses a "pseudo-cron" system (WP-Cron) that runs on every page load to check for scheduled tasks. This is unreliable on low-traffic sites and adds overhead on every request. Replacing it with a real server cron job is more efficient and reliable.
Step 1: Disable WP-Cron in wp-config.php
// Disable WP-Cron (pseudo-cron on page load)
define('DISABLE_WP_CRON', true);
Step 2: Set up a real cron job
Add this to your server's crontab (crontab -e):
# Run WordPress cron every 5 minutes
*/5 * * * * wget -q -O /dev/null https://your-domain.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1
Alternative methods
# Using curl instead of wget
*/5 * * * * curl -s https://your-domain.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1
# Using WP-CLI (recommended if available)
*/5 * * * * cd /path/to/wordpress && wp cron event run --due-now >/dev/null 2>&1
# Using PHP directly (if HTTP access is restricted)
*/5 * * * * php /path/to/wordpress/wp-cron.php >/dev/null 2>&1
Verify it works
# List all scheduled WP-Cron events (requires WP-CLI)
wp cron event list
# Manually trigger WP-Cron to test
wp cron event run --due-now
What this does
- DISABLE_WP_CRON – Prevents WordPress from checking for scheduled tasks on every page load
- Server cron – Runs
wp-cron.phpat a fixed interval (every 5 minutes) regardless of site traffic
Benefits
- Reduced server load – no cron check on every page request
- More reliable – tasks run on schedule even with low traffic
- Faster page loads – one less operation per request
- Predictable execution – cron runs at exact intervals
Note: Most managed WordPress hosts (like Kinsta, WP Engine) already handle this for you. Check with your hosting provider before making changes.