WP-Cron: replacing it with a real cron job

How WordPress’s built-in scheduler works, why scheduled tasks can run late on quiet sites, and how to run WP-Cron from a DirectAdmin cron job.

How-to guideAdvanced2 min readUpdated

WordPress has its own scheduler, WP-Cron, which handles scheduled posts, update checks, backup plugins and shop tasks.

The catch

WP-Cron doesn’t run on a timer. It checks for due tasks when someone visits the site.

  • On a quiet site, tasks run late — scheduled posts appear “Missed schedule”.
  • On a busy site, the check runs on many visits, adding overhead.

Run it from a real cron job

1. Disable the visit-triggered check in wp-config.php, above /* That's all, stop editing! */:

define('DISABLE_WP_CRON', true);

2. Create a cron job in Advanced Features then Cronjobs that runs every 15 minutes:

FieldValue
Minute*/15
Hour*
Day of month*
Month*
Day of week*

Command:

/usr/local/bin/php /home/USERNAME/domains/yourdomain.co.uk/public_html/wp-cron.php >/dev/null 2>&1

Replace USERNAME with your DirectAdmin username and adjust the path if WordPress is in a subfolder. The PHP path can differ; see Running PHP scripts from cron: paths, output and common mistakes for how to confirm it.

Check it works

Schedule a test post a few minutes ahead and confirm it publishes. Many cron-management plugins also show when events last ran.

Every 5 minutes suits shops; hourly is fine for simple brochure sites.

Choosing somewhere to host WordPress? Traxio’s WordPress hosting includes one-click installs, LiteSpeed caching and free SSL, with your first 30 days free.

Popular

Tip: press / to search from any pageSee all results