Economicalhost · Knowledge Base
Knowledge Base › Cron & Automation › How to Replace WP-Cron with a Real Cron Job
Cron & Automation

How to Replace WP-Cron with a Real Cron Job

WordPress's built-in WP-Cron only runs when someone visits the site, so scheduled posts and backups can be late on low-traffic sites. A real cron job fixes this.

Step-by-step

  1. Disable WP-Cron. Edit wp-config.php in File Manager and add above the "stop editing" line:
    define('DISABLE_WP_CRON', true);
  2. Save the file. WordPress will no longer trigger cron on page loads.
  3. Open Advanced → Cron Jobs in cPanel.
  4. Schedule it to run regularly, e.g. every 15 minutes: */15 * * * * (see examples).
  5. Use this command (replace youruser and domain):
    /usr/bin/curl -s https://yourdomain.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1
  6. Add the job and confirm scheduled posts and tasks now fire on time.

💡 Good to know

  • Every 15 minutes suits most sites; busy sites can use 5 minutes.
  • Back up wp-config.php before editing it.
  • This also slightly speeds up your site, since visitors no longer trigger cron processing.