Developer · Guide
How to Run WP-Cron From a Server Cron Job

Short answer
Point a server cron job at wp-cron.php on a fixed interval, such as every 15 minutes with wget, then add define( 'DISABLE_WP_CRON', true ) to wp-config.php so page loads stop firing it. Set the server job up first: disabling WP-Cron with no replacement stops every scheduled task silently. WP-CLI users can run wp cron event run --due-now from the crontab instead.
Key takeaways
- WP-Cron only runs when someone loads a page, so quiet sites miss schedules.
- A server cron line such as /15 * calls wp-cron.php on the clock.
- Set the server job up first, then add define( 'DISABLE_WP_CRON', true ).
- WP-CLI can run only due events with wp cron event run --due-now.
- wp cron event list shows each hook, its next run time, and its recurrence.
What does it mean to run WP-Cron from the server?
Running WP-Cron from the server means the operating system clock calls wp-cron.php on a fixed schedule, instead of page visits triggering it.
The Plugin Handbook states that WP-Cron does not run continuously, and that the fix is to set up the system task scheduler to run on the intervals you want (checked November 2026).
The handbook calls the web request to wp-cron.php the easiest solution. A small tool on the server, such as wget or curl, fetches that file on schedule and WordPress runs whatever is due.
Nothing about the scheduled jobs themselves changes. The same events, hooks, and recurrences run as before, only the trigger moves from visitors to the clock.
Why run WP-Cron from a server cron job?
A server cron job fires on time whether the site has visitors or not, while WP-Cron only runs when someone loads a page.
The Plugin Handbook states that WP-Cron not running continuously can be an issue when critical tasks must run on time (checked November 2026).
Low traffic sites miss schedules. Kinsta states that when a site has little traffic, schedules can be missed because no one has loaded a page (checked November 2026).
High traffic sites get the opposite problem. Kinsta states that wp-cron.php fires on every page load by default, which can add load on busy sites (checked November 2026).
There is also a security angle. Kinsta states that wp-cron.php is a publicly accessible file that anyone can trigger by requesting it, and that repeated requests can spike server load (checked November 2026).
If your host already handles this for you, check first. Kinsta states that managed providers run a server-side cron every 15 minutes by default, so on those hosts you only need to disable WP-Cron and let the platform take care of the rest (checked November 2026).
What do you need before you start?
You need access to your server cron setup and to the wp-config.php file, plus the site URL and the path to the WordPress files.
Server cron access comes in three common forms: a Cron Jobs tool in cPanel, an SSH shell where you can run crontab -e, or a cron tool in your host dashboard. Pick the one your host gives you.
You also need to know which user the web server runs as, often www-data on Linux hosts. The Plugin Handbook states that cron tasks run as a regular user or as root depending on the system user running the command (checked November 2026).
Keep a backup of wp-config.php before you edit it. A guide on how to back up a WordPress database covers the backup habit that protects you when a config edit goes wrong.
How do you point a server cron job at wp-cron.php?
Add one line to the server crontab that fetches wp-cron.php on your chosen interval, using wget, PHP, or WP-CLI.
A cron line has six parts. The Plugin Handbook states that cron syntax contains minute, hour, day of month, month, day of week, and the command to run (checked November 2026).
An asterisk means run regardless of that time part. The handbook gives */15 * * * * command as the pattern for every 15 minutes, no matter the hour, day, or month (checked November 2026).
- Open the crontab with
crontab -eover SSH, or open the Cron Jobs tool in cPanel. - Add a line that calls
wp-cron.phpwithwgetand your real domain in place of the placeholder:
*/15 * * * * wget -q -O - https://yoursite.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1
- Save the crontab and wait for the next 15 minute mark.
The ?doing_wp_cron flag marks the request as a cron run. The >/dev/null 2>&1 part drops the output, and Kinsta states that it disables email notifications for the job (checked November 2026).
The handbook also gives the plain wget form without the flag. Many servers have wget installed, and the handbook example is wget --delete-after http://YOUR_SITE_URL/wp-cron.php, noting that without --delete-after the tool would save the output of the request (checked November 2026).
A once a day run at midnight looks different. The Plugin Handbook gives 0 0 * * * wget --delete-after http://YOUR_SITE_URL/wp-cron.php as the daily midnight pattern (checked November 2026).
| Interval | Cron line start | Use it for |
|---|---|---|
| Every 5 minutes | */5 * * * * | Time sensitive jobs such as order checks |
| Every 15 minutes | */15 * * * * | The usual default for most sites |
| Every hour | 0 * * * * | Light jobs such as daily digests |
| Once a day at midnight | 0 0 * * * | Nightly cleanups and reports |
On Windows servers, use the Task Scheduler instead. The Plugin Handbook states that Windows calls its time based scheduling system the Task Scheduler, reached through Administrative Tools in the control panel (checked November 2026).
The handbook gives this PowerShell command for a Basic Task that calls the WordPress cron script: powershell "Invoke-WebRequest http://YOUR_SITE_URL/wp-cron.php".
In cPanel, the Cron Jobs screen offers preset intervals and a command box. cPanel docs state that the screen asks for Minute, Hour, Day, Month, Weekday, and Command values, and warns to leave enough time between jobs so one run finishes before the next starts (checked November 2026).
How do you disable WP-Cron on page loads?
Add one line to wp-config.php so WordPress stops firing WP-Cron on every page load, but only after the server cron job is already running.
The Plugin Handbook states that after the system task is scheduled, WordPress will keep running WP-Cron on each page load, which adds extra resource use, and that WP-Cron can be disabled in wp-config.php (checked November 2026).
define( 'DISABLE_WP_CRON', true );
Put the line above the comment that reads “That is all, stop editing!” in wp-config.php, so it is set before WordPress loads. The constant only stops page loads from firing the queue. It does not stop events being scheduled, and it does not block a direct request to wp-cron.php.
Order matters here, and getting it backwards is the classic mistake. Kinsta states that you should first set up a server-level cron job and then disable WP-Cron, and that disabling first stops scheduled tasks silently, with no errors, just missed jobs (checked November 2026).
A full walkthrough of the same switch lives in the guide on how to disable WP-Cron and use a real cron job.
How do you use WP-CLI instead of a web request?
Use WP-CLI when you have SSH access, since its cron command runs only the events that are due instead of calling the whole wp-cron.php file.
Kinsta states that the WP-CLI cron command runs only the events that are actually due, which is more efficient than calling wp-cron.php directly (checked November 2026).
Add this line to the crontab with crontab -e, replacing the path with your WordPress folder:
*/15 * * * * cd /path/to/wordpress && wp cron event run --due-now --allow-root >/dev/null 2>&1
The --due-now flag runs all hooks due right now. The WP-CLI command reference lists wp cron event run --due-now as the way to run all cron events due right now (checked November 2026).
You can also call PHP directly with no HTTP request at all. Kinsta gives */15 * * * * php /path/to/wordpress/wp-cron.php >/dev/null 2>&1 and notes that it is slightly faster because it skips the HTTP overhead (checked November 2026).
On a multisite network, WP-Cron needs to run for each subsite. Kinsta states that the cleanest fix is WP-CLI, which handles multisite natively, and gives a per-site --url flag for the cron line (checked November 2026).
How do you check that the server cron job is working?
List the scheduled events with WP-CLI and watch their next run times move forward after each server cron run.
Run wp cron event list from the WordPress folder over SSH. The WP-CLI command reference states that the default fields shown are hook, next_run_gmt, next_run_relative, and recurrence (checked November 2026).
If the list looks normal and events clear between runs, the setup works. Kinsta states the same check in plain terms: run wp cron event list and confirm events are clearing between runs (checked November 2026).
You can also send the cron output to a log file for one cycle. Kinsta gives a line that appends output to /tmp/wpcron.log, and advises checking the file after 15 minutes, then removing the log redirect once confirmed (checked November 2026).
If you have no SSH access, install the WP Crontrol plugin and open Tools and Cron Events in the dashboard. WordPress.org states that the plugin shows all scheduled events with their arguments, schedule, callback functions, and next due time, and warns about events with no actions or missed schedules (checked November 2026).
Kinsta states that the plugin lists all scheduled events, and that a working setup shows events firing only at your server cron interval, not on every page load (checked November 2026).
If scheduled posts keep missing their time, a guide on how to fix scheduled posts with a missed schedule covers the fault from the WordPress side.
What goes wrong most often?
The job never runs because the crontab line has a wrong path, a wrong domain, or a missing wget binary on the server.
Check the line character by character. A missing slash in the WordPress path, or http where the site now forces https, is enough to break the call without any visible error.
The constant is in the wrong place in wp-config.php. If DISABLE_WP_CRON sits below the line that loads WordPress, it is set too late to change anything, and page loads keep firing the queue.
The server cron fires but events still pile up. That points at the events themselves, not the trigger. A guide on how to fix WP-Cron not running walks through the checks on the WordPress side.
A plugin can also block the run. Some security plugins block direct requests to wp-cron.php, so check the plugin settings when the log shows the request but nothing runs.
What mistakes should you avoid?
Never disable WP-Cron before the server job exists, since that stops every scheduled task at once with no error.
Do not set the interval shorter than your jobs need. A five minute interval is fine for time sensitive work, but an hourly job does not need to fire every minute.
Do not run the cron as root when the site files belong to another user. A job run as the wrong user can create files the web server cannot read, or fail to write where it must.
Do not forget the >/dev/null 2>&1 tail on a busy site. Without it, cron emails the output of every run, and a 15 minute job means 96 emails a day.
When a plugin leaves old events behind after deactivation, a guide on how to fix WooCommerce Action Scheduler past due actions shows how stale scheduled work is cleared.
Frequently asked questions
How often should the server cron job run?
Every 15 minutes suits most sites, and the Plugin Handbook gives /15 * as its example interval. Use every 5 minutes for time sensitive jobs such as order checks, and hourly or daily for light work such as digests. Match the interval to what your scheduled jobs need, not to a default you copied.
Can I set this up in cPanel instead of SSH?
Yes, if your host gives you a Cron Jobs tool, use it instead of editing the crontab by hand. In cPanel, open Cron Jobs under Advanced, pick a schedule, and paste the same wget command with your domain. The command is the same either way, and the tool saves it into the server crontab for you.
Does this work on a small site with little traffic?
Yes. WP-Cron still works the same way, and a server cron job is often the fix for missed schedules on quiet sites. Add the crontab line first, then set DISABLE_WP_CRON to true. Check the change with wp cron event list to confirm events are clearing between runs.
What do I check first if scheduled tasks still do not run?
First, check the crontab line for a wrong path or domain, and confirm wget or PHP exists on the server. Second, check that DISABLE_WP_CRON sits above the line that loads WordPress in wp-config.php. Third, list events with wp cron event list to see whether the queue itself is stuck.
Does this change for a multisite network?
Yes. On multisite, WP-Cron needs to run for each subsite, not just the main site. The cleanest fix is WP-CLI, which handles multisite natively: pass a --url flag per site in the cron line, or loop over wp site list output. The DISABLE_WP_CRON constant applies across the whole network from one line.
Sources
- Hooking WP-Cron Into the System Task Scheduler WordPress Developer Resources
- Disabling WP-Cron (wp-cron.php) for Faster Performance Kinsta
- wp cron event – WP-CLI Command WordPress Developer Resources
- wp cron event list – WP-CLI Command WordPress Developer Resources
- Scheduling WP Cron Events WordPress Developer Resources
- Cron Jobs | cPanel & WHM Documentation cPanel
- WP Crontrol – WordPress plugin 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.
Thanks — we review requests within 3 business days.


