Plugins Plugin hub Backup SEO Caching Security Forms WooCommerce Images Best backup plugins
Hosting Hosting directory Shared Managed Cloud India
Themes & builders Compare Rank Math vs Yoast
Tools All tools Hosting finder Plugin stack builder Cost calculator Salt generator Theme detector Who is hosting this? Speed test Headline analyzer robots.txt generator Redirect generator Uptime calculator Blog name generator
Best lists Best backup plugins Deals
Guides All guides Speed up WordPress Choose hosting Back up WordPress
How we test

Speed & performance · Guide

How to Replace WP-Cron With a Real Cron Job

Short answer

Add define( 'DISABLE_WP_CRON', true ); to the config file, after you set up a server cron job that calls the cron file every 15 minutes. Use cPanel Cron Jobs, crontab with wget or curl, or WP-CLI with wp cron event run --due-now, depending on your host. Then check WP Crontrol or your server logs to confirm events run on schedule.

Key takeaways

  • WP-Cron only runs when a page loads, so quiet sites run scheduled work late and busy sites check for due work on every visit.
  • Set up the server cron job before you add DISABLE_WP_CRON to wp-config.php, or scheduled tasks will stop with no error.
  • Every 15 minutes suits most sites, with every 5 minutes for stores and membership sites that need faster timing.
  • WP Crontrol shows each event, its next due time, and warnings for missed schedules, with logs kept for 30 days.
  • WP Engine Alternate Cron checks due work every minute, while Kinsta runs a server cron every 15 minutes by default.
  • A 200 response in the server logs means wp-cron.php ran, while a 502 means the process timed out.

What is WP-Cron and why does it miss scheduled work?

WP-Cron is WordPress's built-in scheduler, and it only runs when a page loads, so quiet sites run scheduled work late.

The WordPress Plugin Handbook says WP-Cron does not run continuously, which can be a problem when tasks must run on time. A real system cron runs on a clock instead.

WP-Cron handles work such as scheduled posts, update checks, backups, and plugin jobs. Kinsta lists post scheduling, update checks, and backups as common examples.

WP Engine explains the two failure modes. A quiet site runs events late, while a busy site checks for due work on every page visit and adds needless load.

What do you need before you start?

You need administrator access, a backup, your site URL, and a host panel or SSH access for a scheduled job.

Back up the site first, so you can restore it if an edit goes wrong. Test the change on a staging copy, as shown in the guide to set up a staging site for WordPress.

You also need to know how you will reach your files: a file manager, FTP, or SSH access.

Check your PHP version too. WordPress.org recommends PHP 8.3 or greater, with MariaDB 10.11 or MySQL 8.4, as of November 2026. The guide to check the PHP version on your host shows where to find it.

Keep these details close:

  • Your domain name, with https:// in front of it
  • The full path to your WordPress folder
  • Whether your host offers cPanel, its own panel, or SSH only

How often should a real cron job run?

Every 15 minutes suits most sites, while stores and membership sites may need every 5 minutes.

Kinsta calls every 15 minutes a good default for most sites. It also notes that twice per hour is a common setting on shared hosts.

IntervalWhat it meansBest for
Every 5 minutes*/5 * * * *Stores, membership sites, and time-sensitive emails
Every 15 minutes*/15 * * * *Most blogs, business sites, and news sites
Every 30 minutes*/30 * * * *Quiet sites with few scheduled tasks
Every 60 minutes0 * * * *Sites where a one-hour delay is fine

cPanel warns that jobs run too often can start a new run before the last one ends, which can degrade performance.

How do you set up a real cron job in cPanel?

Open cPanel, go to Advanced, then Cron Jobs, pick a schedule, paste the wget command, and click Add New Cron Job.

Kinsta gives the same path: log in to cPanel, open the Advanced section, and click Cron Jobs. Follow these steps:

  1. Log in to cPanel and open Advanced > Cron Jobs.
  2. Pick a preset under Common Settings, such as Twice Per Hour.
  3. Paste the command below into the Command box, with your own domain in place of yoursite.com.
  4. Click Add New Cron Job and check that the job appears in Current Cron Jobs.
wget -q -O - https://yoursite.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

cPanel says the Common Settings menu fills in the Minute, Hour, Day, Month, and Weekday boxes for you. You must still give a value for every box and for the Command box.

The >/dev/null 2>&1 part sends the job output away instead of emailing it to you. Kinsta says this part disables email notifications.

How do you set up a real cron job with crontab and SSH?

Connect by SSH, run crontab -e, add one line that calls the cron file every 15 minutes, then save the file.

The WordPress Plugin Handbook says Mac OS X and Linux both use cron, and you reach it from the terminal with crontab -e. Edit it as the site owner, not as root.

A crontab line has six parts, in this order:

  • Minute
  • Hour
  • Day of month
  • Month
  • Day of week
  • Command to run

An asterisk means every value for that field. The Handbook gives */15 * * * * command as the pattern for every 15 minutes.

Add this line to call wp-cron.php with wget:

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

The Handbook's own wget example is wget --delete-after http://YOUR_SITE_URL/wp-cron.php, and it notes that without --delete-after, wget would save the output of the request. The -q -O - form above sends the output to the terminal instead, and >/dev/null 2>&1 discards it.

You can also call the same file with curl:

*/15 * * * * curl -s https://yoursite.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

WP Engine uses curl to fetch the cron file in its own Alternate Cron service, which checks for due work every minute. The curl line above follows the same pattern as the wget line, with the same flag.

Replace YOUR_SITE_URL with your own domain in every example, and use https:// when your site has a certificate.

How do you disable WP-Cron in wp-config.php?

Add the disable constant to your config file just before the line that says “That is all, stop editing”, after your server cron job is ready.

Set up the server cron job first. Kinsta warns that if you disable WP-Cron first without a replacement, scheduled tasks will stop running silently, with no errors.

Open the config file in the root folder of your site. Add this line just before the comment that says “That is all, stop editing! Happy blogging.”:

define( 'DISABLE_WP_CRON', true );

The WordPress Plugin Handbook gives the same line and placement. It also says WordPress will keep running WP-Cron on each page load until you add it.

This constant stops the page-load trigger only. It does not block direct calls to the cron file, so your server cron job still works after you save the file.

How do you use WP-CLI instead of wget or curl?

Run wp cron event run --due-now from your site folder on a schedule, so only due events run instead of a full web request.

Kinsta calls WP-CLI the cleanest method when it is available. Its cron command runs only the events that are due, which is more efficient than calling the cron file through the web server.

Add this line with crontab -e:

*/15 * * * * cd /path/to/wordpress && wp cron event run --due-now --allow-root >/dev/null 2>&1

Replace /path/to/wordpress with the full path to your WordPress folder. The cd step matters, because WP-CLI needs to run from inside the site folder.

You can list pending events at any time with wp cron event list. WP Engine gives the same command for finding stuck events.

On a multisite network, WP-Cron needs to run for each subsite, not just the main site. Kinsta says WP-CLI handles multisite natively, with a --url flag for each subsite.

How do you check that the new setup works?

Open WP Crontrol, watch event times move forward, and check your server logs to confirm the job fires on schedule.

Install the free WP Crontrol plugin, then go to Cron > Cron Events in your dashboard. The plugin page says Tools > Cron Events still works too.

WP Crontrol shows every scheduled event with its arguments, schedule, callback, and next due time. It also warns you about events that have missed their schedule.

Turn on logging for the events you want to watch. WordPress.org says entries are kept for 30 days, up to 10,000 entries per site, and each logged run records its duration, errors, HTTP requests, and emails sent.

WP Engine suggests a log check too. Search your Site Access Logs for wp-cron.php, where a 200 response means the cron is working and a 502 response means a timeout, which WP Engine says to fix by making the process complete in under 60 seconds, as of November 2026.

Monitor your WordPress site after the change, so a missed job shows up before a post or renewal goes missing.

What mistakes should you avoid?

Do not disable WP-Cron before the replacement job runs, do not run the job every minute on shared hosting, and do not leave the job untested.

The most common mistakes are easy to prevent:

  • Disabling WP-Cron with no server job behind it, so nothing runs at all
  • Typing the wrong domain or path in the cron command
  • Leaving out ?doing_wp_cron from the wp-cron.php URL
  • Running the job every minute on a shared host that limits cron frequency
  • Forgetting to save the config file after adding the line, then wondering why nothing changed
  • Testing nothing, then finding a missed post days later

If scheduled posts still miss their time, read the guide to fix scheduled posts with a missed schedule.

If events never run, read the guide to fix WP-Cron not running.

WooCommerce stores have one more trap. Its Action Scheduler queues orders, renewals, and emails, and a broken cron leaves those jobs waiting. The guide to fix WooCommerce Action Scheduler past-due actions covers that queue.

Password protection can block a cron call too. WP Engine says its Alternate Cron does not work for sites with basic authentication, because the cron file must stay publicly reachable.

When should you leave WP-Cron alone or use a host tool instead?

Leave WP-Cron alone on a small site with steady traffic, and use your host's built-in cron tool when one is offered.

A small blog with daily visitors and no time-sensitive jobs may not need this change.

Many managed hosts already run a server cron for you. Kinsta says managed providers like Kinsta run a server-side cron every 15 minutes by default, as of November 2026.

WP Engine offers a different path. Its Alternate Cron checks for due work every minute by curling the cron file, and you turn it on in the User Portal under Sites, then the environment, then Utilities, then the Alternate cron toggle.

WP Engine also warns that adding the disable line to the config file on its own will not enable Alternate Cron. The toggle is the step that starts the service, and the define is set by the platform and checked daily.

On SiteGround, go to Site Tools, then Devs > Cron Jobs, enter the time interval and the exact command, and click Create. SiteGround gives those steps in its cron jobs guide.

Frequently asked questions

Will scheduled posts still publish after I disable WP-Cron?

Yes, if your server cron job is running. The job calls wp-cron.php on a fixed schedule, so due posts publish on the first run after their scheduled time. If you disable WP-Cron with no server job behind it, scheduled posts will sit unpublished, with no error shown in the dashboard.

Can I run the server cron job every minute?

Only if your host allows it. On shared hosting, jobs that run too often can overlap and slow the server, and some hosts limit how often a cron job may run. Every 15 minutes suits most sites. A host-managed service is different: WP Engine Alternate Cron checks for due work every minute by design.

Do I need WP-CLI to replace WP-Cron?

No. WP-CLI is the cleanest method when it is available, because it runs only the events that are due. Without it, a wget or curl call to wp-cron.php from cPanel Cron Jobs or crontab works on most hosts. Pick the method your host supports, and use the same 15-minute schedule either way.

What happens if I disable WP-Cron and forget the server job?

Nothing scheduled runs at all. Scheduled posts stay unpublished, update checks do not happen, and plugin jobs such as backups and subscription renewals wait without an error message. Remove the DISABLE_WP_CRON line to restore the old page-load behaviour, then add the server job before you disable WP-Cron again.

Can I use this setup on a WordPress multisite network?

Yes, but WP-Cron needs to run for each subsite, not just the main site. WP-CLI handles multisite with a url flag for each subsite, so it is the best choice on a network. The DISABLE_WP_CRON line in wp-config.php applies across the whole network, so add it once.

Sources

  1. Hooking WP-Cron Into the System Task Scheduler WordPress Developer Resources
  2. Scheduling WP Cron Events WordPress Developer Resources
  3. Disabling WP-Cron (wp-cron.php) for Faster Performance Kinsta
  4. Configure wp-cron and Event Scheduling WP Engine Support
  5. Cron Jobs cPanel & WHM Documentation
  6. WP Crontrol WordPress.org
  7. Requirements WordPress.org

Is your product missing, or something out of date?

Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.

About the editors

WPLegible editors

Researched from the primary sources listed above and checked against our editorial rules. About the site · How we test