What Is WP-Cron? How to Disable It and Use a Real Cron Job

Scheduled posts stuck on Missed schedule? Learn how WP-Cron works and how to swap it for a real cron job without losing a single task.

20 mins read
WordPress website illustration featuring WP-Cron scheduling mechanisms, website visitors, an hourglass and a server powered by a metronome.

A post scheduled for 6 a.m. still says “Missed schedule” at noon. A nightly backup ran in the middle of the afternoon instead. Both problems usually trace back to WP-Cron, the task scheduler built into WordPress.

WP-Cron does not run on a clock. It only runs when a request reaches WordPress, so quiet sites, heavily cached sites and servers that block loopback requests end up with tasks that run late or never. The standard fix is to disable WP-Cron with the DISABLE_WP_CRON constant and let a real cron job trigger WordPress on a fixed schedule.

This guide explains how WP-Cron works, when disabling it improves performance (and why the gain is smaller than many tutorials claim), and how to switch to a real cron job with WP Toolkit, cPanel, WP-CLI or an external cron service. It also covers the parts most guides skip: Multisite networks, WooCommerce queues and how to confirm nothing broke.

Quick answer: create a real cron job that calls https://example.com/wp-cron.php (or runs wp cron event run --due-now with WP-CLI) every 5 minutes. Then add define( 'DISABLE_WP_CRON', true ); to wp-config.php, above the “That’s all, stop editing!” line. Do it in that order so your scheduled tasks never stop running. If your host has WP Toolkit, its Take over wp-cron.php switch does both steps for you.

What is WP-Cron?

WP-Cron is the scheduling system in WordPress core. It handles time-based jobs such as publishing scheduled posts, checking for core, plugin and theme updates, and permanently deleting items that have sat in the trash for 30 days. Plugins rely on it too. Backup plugins, security scanners, cache preloaders, newsletter tools and WooCommerce all queue work through it, so when people talk about WordPress cron jobs, these queued events are usually what they mean.

The name borrows from cron, the Unix utility that runs commands at set times, but the two work very differently. A Unix cron daemon runs continuously and checks the clock every minute. WP-Cron only wakes up when a request reaches WordPress. On each of those requests, WordPress reads the list of scheduled events stored in the cron option of the wp_options table. If an event is due, WordPress sends a background request to its own wp-cron.php file (a loopback request), and that file runs the job in a separate PHP process. Since WordPress 6.9, core sends that request at the end of the page request, so it no longer holds up the first byte the visitor receives.

Core ships with four recurrence intervals: hourly, twice daily, daily and weekly. Plugins can register their own, including some that run every minute. Because everything depends on incoming requests, WP-Cron guarantees that a due task will run eventually. It does not guarantee that it will run on time.

What is WP-Cron and how to disable WordPress cron jobs in favor of a real cron job

WP-Cron vs a real cron job

A real cron job (also called a server cron or system cron) is scheduled by the operating system or by an outside service, so it fires whether or not anyone visits your site. Here is how the two compare.

WP-Cron (default)Real cron job
What triggers itA request that reaches WordPress (PHP)The server clock or an external scheduler
When tasks runOn the next uncached request after the due timeOn a fixed interval you choose, such as every 5 minutes
Low-traffic sitesTasks can run hours lateTasks run on time with zero visitors
Sites behind full-page cachingCached pageviews never trigger itNot affected by caching
Busy sitesHeavy jobs can start at peak trafficOne predictable run per interval
Effect on the visitor who triggers itBefore WordPress 6.9, could delay the first byte of that pageNone
Blocked loopback requestsStops workingKeeps working (WP-CLI and PHP commands need no HTTP request)
SetupNoneAbout 10 minutes, or one switch with WP Toolkit

Why WP-Cron misses tasks or wastes server resources

Most WP-Cron complaints come from one of four situations. Knowing which one applies to your site tells you how much a real cron job will help.

Low traffic means late tasks

If nobody visits between 2 a.m. and 9 a.m., a post scheduled for 6 a.m. waits for the first visitor after 9. Until then it sits in the Posts screen with a “Missed schedule” label. New blogs, staging sites and B2B sites that only get traffic during office hours run into this all the time.

Full-page caching hides your visits from WordPress

This one catches a lot of site owners off guard. When a page cache answers a request (server caching such as Varnish or LiteSpeed, a CDN, or a caching plugin that serves static HTML files), PHP never runs, so WordPress never checks the cron queue. A site can serve thousands of cached pageviews a day and still miss a scheduled post. Logged-in users and uncached URLs do trigger WP-Cron, which is why the misses look random.

Heavy jobs compete with your visitors

On a busy site, WordPress checks the queue on every uncached request. The check itself is cheap. The cost comes from the jobs it launches. A product import, a large email batch or a full site backup from one of the popular WordPress backup plugins runs in its own PHP process and competes with real visitors for PHP workers, CPU and database connections. On shared or entry-level hosting with only a few PHP workers, that shows up as slow responses or 503 errors at moments you cannot predict, because the job starts whenever a visit happens to trigger it.

Blocked loopback requests stop WP-Cron completely

WP-Cron starts jobs by making your server send an HTTP request to itself. Firewalls, security plugins, password-protected staging sites, expired SSL certificates and some host configurations block that request. When the loopback fails, scheduled tasks do not run at all, and Tools > Site Health warns that the loopback request to your site failed.

Does disabling WP-Cron make WordPress faster?

It depends on your WordPress version, and the gain is smaller than many tutorials claim. Before WordPress 6.9, the visitor whose page view triggered WP-Cron could wait while WordPress opened the loopback request. In a test posted on the WordPress core ticket for this issue, which simulated a slow loopback, time to first byte on that page jumped from about 0.18 seconds to 1.2 seconds. WordPress 6.9 moved the cron spawn to the end of the request, which removed most of that delay.

On an up-to-date site, then, disabling WP-Cron barely changes a single page’s speed test. If you still run an older version, updating WordPress gets you most of that improvement on its own. The real benefit is predictability. Heavy jobs stop riding on visitor traffic and run on a schedule you choose, which smooths out the CPU spikes that hurt busy or resource-limited servers. Treat it as a reliability fix that also helps performance under load. For the changes that move Core Web Vitals, such as caching, image compression and a lighter theme, work through our checklist to speed up your WordPress site.

Should you disable WP-Cron on your site?

For most production sites, yes, as long as something replaces it. Use this quick check:

  • Disable it if your site misses scheduled posts, runs heavy plugin jobs such as backups, imports or WooCommerce queues, sits behind full-page caching, or gets little traffic.
  • Check your host first. Many managed hosts already run a server cron for every site, and on cPanel or Plesk servers with WP Toolkit the Take over wp-cron.php switch may already be on. Adding a second cron job only duplicates the work.
  • Leave it on if you cannot create a cron job and cannot use an external service either. A WP-Cron that runs late is better than no scheduler at all.

Before you start: check what WP-Cron is running

Spend five minutes on the current queue before you change anything. It tells you how often your cron job needs to run, and it often exposes a plugin that schedules jobs far more often than it needs to.

  • Go to Tools > Site Health and look for “A scheduled event has failed”, “A scheduled event is late” or a loopback warning.
  • Install the free WP Crontrol plugin and open Tools > Cron Events. It lists every event with its hook, recurrence and next run time, and flags events that are overdue.
  • If you have SSH access, run wp cron event list to see the same queue and wp cron test to check whether WordPress can spawn WP-Cron through a loopback request.

Download a copy of wp-config.php while you are at it. One stray character in that file can take the whole site offline, and having a backup turns the fix into a 30-second upload.

How to disable WP-Cron safely in 3 steps

Order matters here. If you disable WP-Cron first, every scheduled task stops until the replacement is running, and a busy week can go by before anyone notices. Set up the real cron job first, then switch WP-Cron off.

  1. Create a real cron job that triggers WordPress every 5 minutes, using WP Toolkit, cPanel, WP-CLI or an external cron service.
  2. Add define( 'DISABLE_WP_CRON', true ); to wp-config.php.
  3. Confirm that scheduled posts and plugin tasks still run on time.

Step 1: Set up a real cron job

The official WordPress Plugin Handbook recommends hooking WP-Cron into the system task scheduler whenever tasks have to run on time. You have four ways to do that. Use WP Toolkit if your host includes it, a cPanel cron job if it does not, WP-CLI if you have SSH access, or an external service if you have none of these.

Option A: Turn on Take over wp-cron.php in WP Toolkit (easiest)

Many cPanel and Plesk hosts include WP Toolkit, and it has a switch that handles both steps of this guide. It adds DISABLE_WP_CRON to wp-config.php and creates a replacement cron job for you.

  1. Open WP Toolkit in cPanel (some hosts label it WordPress Management), or WordPress in Plesk.
  2. Find your site and turn on Take over wp-cron.php.
  3. Click the settings icon next to that switch and set the schedule to every 5 minutes. The replacement task runs every 30 minutes by default, which is too slow for most sites.
  4. In Plesk, make sure Create a replacement task when takeover is initiated is enabled in the same settings. Without it, Plesk disables WP-Cron but creates no cron job.

Always change the schedule from WP Toolkit’s own settings. On cPanel, edits made directly to the cron job that WP Toolkit created can be overwritten. With this option you can skip Step 2, because WP Toolkit has already added the constant.

Option B: Create a cron job in cPanel

Most shared hosts include cPanel, and its Cron Jobs tool takes a couple of minutes to set up. Plesk calls the same feature Scheduled Tasks, and hPanel and DirectAdmin call it Cron Jobs, so the steps below translate directly.

  1. Log in to cPanel and open Cron Jobs, usually under the Advanced section.
  2. While you test, add your email address under Cron Email so you receive the output. The command below hides its output, so remove >/dev/null 2>&1 from it for the first run if you want to see those emails.
Opening the Cron Jobs tool in the cPanel hosting control panel
cPanel Cron Jobs screen used to set up a WordPress cron job
  1. Under Add New Cron Job, open Common Settings and choose Once Per Five Minutes (*/5 * * * *).
  2. Paste the command below into the Command field, replace example.com with your domain, and click Add New Cron Job. It now appears under Current Cron Jobs.
wget -q -O - https://example.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1
Choosing the cron interval under Common Settings in cPanel
Adding the wp-cron.php command to a new cron job in cPanel

If your server does not have wget, curl does the same job:

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

Use the exact address shown under Settings > General, including https and the www (or the lack of it). A request to the wrong version of your site URL gets redirected, and curl does not follow redirects unless you add -L. If you copy the command from a document instead of the box above, check that the hyphen after -O is a plain hyphen. Word processors often swap it for a dash, and the command then fails.

You can also skip HTTP entirely and have cron run wp-cron.php through PHP. This keeps working when a firewall, a CDN rule or password protection blocks web requests:

cd /home/USER/public_html && /usr/local/bin/php wp-cron.php >/dev/null 2>&1

Replace /home/USER/public_html with the folder that contains wp-config.php. The PHP path differs between hosts (/usr/local/bin/php and /usr/bin/php are common), so check your host’s documentation if the command fails. This method suits single sites. For Multisite networks, use the WP-CLI loop further down.

Option C: Run WP-Cron with WP-CLI (best if you have SSH)

If your host gives you SSH access and WP-CLI, this is the most reliable option. WP-CLI runs due events through PHP on the command line, so it never goes through the web server. There is no loopback request to block and no web server timeout to hit, and it keeps working on password-protected staging sites.

Run crontab -e and add this line:

*/5 * * * * cd /home/USER/public_html && wp cron event run --due-now --quiet >/dev/null 2>&1

Replace /home/USER/public_html with the folder that contains wp-config.php. Cron runs with a minimal PATH, so if nothing happens, swap wp for its full path (run which wp to find it; /usr/local/bin/wp is common). The --due-now flag runs only the events that are due.

If some of your jobs can take longer than the interval, such as big imports or backups, wrap the command in flock. A new run then exits straight away while the previous one is still working:

*/5 * * * * cd /home/USER/public_html && flock -n /tmp/wp-cron-example.lock wp cron event run --due-now --quiet >/dev/null 2>&1

Option D: Use an external cron service

No cron access at all? An external service can call wp-cron.php for you over HTTP. EasyCron and cron-job.org are two common choices, and both have free tiers. Free plans change, so check the current limits before you rely on one.

  1. Create an account and add a new cron job.
  2. Enter https://example.com/wp-cron.php?doing_wp_cron as the URL to call.
  3. Set the schedule to every 5 minutes, or the shortest interval your plan allows.
  4. Save the job, wait for a few runs and check its execution log for HTTP 200 responses.
Creating a new cron job for wp-cron.php in EasyCron
EasyCron settings for a WordPress cron job URL and interval
EasyCron cron job list showing the WordPress wp-cron.php task

If the site sits behind Cloudflare, a web application firewall or a security plugin with bot protection, allow these requests. A challenge page built to stop bots stops the cron service too, and the job fails without any visible error on your site.

How often should the cron job run?

Site typeIntervalCron expressionWhy
Blog or brochure siteEvery 15 minutes*/15 * * * *Scheduled posts publish at most 15 minutes late
Most business and content sitesEvery 5 minutes*/5 * * * *A good balance between accuracy and server load
WooCommerce, membership and LMS sitesEvery minute* * * * *Keeps order emails, renewals and Action Scheduler queues moving

Some shared hosts set a minimum gap between cron runs. If yours does, use the shortest interval it allows. Avoid anything slower than 15 minutes: with a 30-minute cron (WP Toolkit’s default), a post scheduled for 9:00 can go live at 9:29.

Large WooCommerce stores can go a step further. Action Scheduler, the queue WooCommerce uses for background jobs, ships its own WP-CLI command, wp action-scheduler run, and its documentation recommends WP-CLI over the default WP-Cron runner for large sites and long-running tasks. Ask your developer to schedule it alongside your regular cron job.

Step 2: Add DISABLE_WP_CRON to wp-config.php

With the real cron job running, tell WordPress to stop triggering WP-Cron on page loads. Skip this step if you used WP Toolkit, which has already done it. Open wp-config.php in the root folder of your WordPress install through your host’s File Manager or SFTP, and add this line above the comment that reads /* That's all, stop editing! Happy publishing. */:

define( 'DISABLE_WP_CRON', true );
DISABLE_WP_CRON constant added to the WordPress wp-config.php file

Type the line yourself or paste it from the box above. If you copy it from a page that turned the straight quotes into curly ones, PHP throws a fatal error and the site stays down until you fix the file.

This constant does one thing: it stops page loads from triggering WP-Cron. WordPress still adds events to the queue, and wp-cron.php still runs whatever is due when your cron job calls it (or when WP-CLI runs the queue). That is why the replacement has to exist first. If you are editing this file anyway, our guide to the hidden features inside the WordPress config file covers other constants worth knowing.

Step 3: Check that scheduled tasks still run

Give the new setup a day and check it from a few angles:

  • Schedule a test post 10 minutes ahead and confirm it publishes within one cron interval of its time. Delete it afterwards.
  • In Tools > Cron Events (WP Crontrol), refresh after a few minutes. Next-run times should keep moving forward instead of piling up as overdue.
  • Recheck Tools > Site Health. Warnings about late or failed scheduled events should clear.
  • On WooCommerce, open WooCommerce > Status > Scheduled Actions and look at the Past-due view. It should stay close to empty.
  • With WP-CLI, run wp cron event list and look for events whose next run is far in the past.

Setting up a real cron job on WordPress Multisite

On a WordPress Multisite network, one DISABLE_WP_CRON line in wp-config.php switches WP-Cron off for every site at once. The cron queue does not work that way. Each site keeps its own list of scheduled events, so a cron job that only calls the main site’s wp-cron.php leaves every subsite’s posts, emails and plugin jobs waiting.

With WP-CLI, one crontab line can loop through every active site:

*/5 * * * * cd /home/USER/public_html && wp site list --field=url --archived=0 --deleted=0 | xargs -I {} wp cron event run --due-now --url={} --quiet >/dev/null 2>&1

The WP-CLI documentation also lists a --network flag for wp cron event run that does this in one command, but at the time of writing it has not reached a stable WP-CLI release. Until it does, the loop is the safer choice. Without WP-CLI, add one URL-based cron job per site, each pointing at that site’s own address, such as https://example.com/site-two/wp-cron.php on a subdirectory network.

Optional: block public access to wp-cron.php

Disabling WP-Cron does not remove wp-cron.php. The file stays publicly reachable, and anyone (or any bot) can request it to make your server process the queue. If your cron job runs WP-CLI or calls wp-cron.php through PHP on the command line, nothing legitimate needs that URL, so you can block it at the web server.

Apache 2.4, in the .htaccess file in your WordPress root:

<Files "wp-cron.php">
    Require all denied
</Files>

Nginx, inside your site’s server block:

location = /wp-cron.php {
    deny all;
}

Only do this with a command-line method. Commands that use wget or curl, and external cron services, reach wp-cron.php over HTTP, so blocking the file would stop your cron job. If you used WP Toolkit, check which command it created before you block anything. Expect Site Health’s loopback test to report a failure afterwards, since that test sends its request to wp-cron.php. In this setup the warning is harmless.

WP-Cron not working? Fixes for missed schedule errors

If tasks still run late after the switch, match the symptom to its usual cause:

SymptomLikely causeFix
Posts still show “Missed schedule”The cron job is not running, or it calls the wrong URLRemove >/dev/null 2>&1 for one run, read the cron email and match the URL in Settings > General
Posts go live up to 30 minutes lateWP Toolkit’s default 30-minute scheduleChange it to every 5 minutes in the Take over wp-cron.php settings
The cron service logs 401 or 403 errorsPassword protection, a firewall or CDN bot protectionAllow the request, or switch to a PHP or WP-CLI command
Site Health reports a failed loopback requestYour server cannot send requests to itselfUse a real cron job; PHP and WP-CLI commands avoid HTTP entirely
The PHP or WP-CLI cron line does nothingCron cannot find the php or wp binary, or your WordPress folderUse full paths for all of them
CPU spikes every few minutesA plugin schedules heavy events too oftenFind the hook in WP Crontrol and change that plugin’s settings
WooCommerce scheduled actions pile upThe cron job runs too rarely for the queueRun it every minute

If you cannot create a real cron job and loopback requests keep failing, WordPress has one more fallback: define( 'ALTERNATE_WP_CRON', true ); in wp-config.php. It redirects a visitor’s request and runs cron inside it, which adds ?doing_wp_cron= to the URL that visitor sees. Use it as a stopgap while you sort out hosting, not as a permanent setup.

If reliable publishing is all you need, our guide on how to schedule posts in WordPress covers the native scheduler and the plugins that republish missed posts.

WP-Cron intervals, WP Toolkit, WooCommerce, Multisite and rollback

How often should a WordPress cron job run?

Every 5 minutes suits most sites. Use every minute for WooCommerce, membership and LMS sites with busy queues, and every 15 minutes for simple blogs. Any slower and scheduled posts start going live noticeably late.

Will disabling WP-Cron stop my scheduled posts from publishing?

Only if nothing replaces it. Scheduled posts are WP-Cron events (the publish_future_post hook), so once DISABLE_WP_CRON is set they publish only when a real cron job or WP-CLI runs the queue. Set up the cron job first and your posts keep going live on time.

Does Take over wp-cron.php in WP Toolkit do the same thing?

Yes. It adds DISABLE_WP_CRON to wp-config.php and creates a replacement cron job in one step. Its default schedule is every 30 minutes, so open the settings next to the switch and change it to every 5 minutes for most sites.

Does DISABLE_WP_CRON work on WordPress Multisite?

Yes. One line in wp-config.php disables WP-Cron for the whole network. Each site still has its own event queue, though, so your real cron job has to run for every site, for example by looping through wp site list with WP-CLI.

Is it safe to disable WP-Cron on a WooCommerce store?

Yes, and it usually helps. WooCommerce relies on Action Scheduler, which processes its queue through WP-Cron, so a store benefits from a steady trigger. Run the real cron job every minute and watch the Past-due view on the Scheduled Actions screen under WooCommerce Status.

How do I turn WP-Cron back on?

Delete the DISABLE_WP_CRON line from wp-config.php or change true to false, then remove your server or external cron job so WordPress is not triggered twice. If you used WP Toolkit, just turn Take over wp-cron.php off. WP-Cron goes back to running on page loads straight away.

What is the difference between DISABLE_WP_CRON and ALTERNATE_WP_CRON?

DISABLE_WP_CRON stops page loads from triggering WP-Cron, so a real cron job has to take over. ALTERNATE_WP_CRON keeps WP-Cron on page loads but runs it through a redirect instead of a loopback request, for servers where loopbacks fail. It adds a query string to visitors’ URLs, so treat it as a temporary fix.

Put your scheduled tasks on a real clock

WP-Cron is a sensible default for a brand-new site, but it ties every scheduled task to traffic you do not control. Once a site has real content, plugins doing background work or a page cache in front of it, a real cron job is the better setup. Create the cron job first (WP Toolkit if your host has it, WP-CLI if you have SSH, cPanel or an external service otherwise), add DISABLE_WP_CRON to wp-config.php unless WP Toolkit already did, then watch Site Health and WP Crontrol for a day. The whole change takes about 10 minutes, and after it your scheduled posts, backups and store emails run when you planned them.

Sources checked for this guide: the WordPress Plugin Handbook chapter on cron, the WP-CLI cron command reference, WordPress core ticket #63858, the WP Toolkit documentation from cPanel and Plesk, and the Action Scheduler WP-CLI guide.

Larissa Lopes

Written by

Larissa Lopes

A content writer and digital strategist at Visualmodo, covering web development, WordPress, SEO, and digital marketing. She translates complex technical concepts into clear, actionable guidance for developers and site owners. From plugin reviews and web analytics to domain strategy and social media growth, Larissa writes with a consistent reader-first approach while keeping her audience informed on emerging trends in cryptocurrency and fintech.

Topics
Continue reading What Is WordPress? How It Works and Reasons to Use It for Your Website
Continue reading 8 Best IDX Plugins for Your Real Estate WordPress Website
Continue reading Troubleshooting Common WordPress Errors: Complete Tutorial
Continue reading 5 WordPress Performance Metrics to Track (and What to Do When They Drop)
Continue reading How to Add Custom Code to WordPress Safely Without Breaking Your Site

Recommended For You