• Skip to main content
  • Skip to primary sidebar
  • Home
  • WordPress
  • web Hosting
  • linux
  • mysql
  • nginx
  • apache2
  • devops

Raju Ginni

wordpress tutorials seo hosting etc

You are here: Home / wordpress tutorials for beginners advanced complete guide to run WordPress / wp cron job check working or not disable enable change schedule

wp cron job check working or not disable enable change schedule

 

Table of Contents

Toggle
  • Problem with default wp cron job?
  • What happens if WP-Cron stops working?
  • How to Add a Server Cron
  • disable WordPress cron job,
    • wordpress check if cron is running
    • How to Create a Cron Job and Execute at a Given Time
  • Explanation
  • 40 – 40th Minute 18 – 06 PM 20 – 20th Day 04 – 4th Month (April) * – Every day of the week once a day 00AM 0 0 * * *
  • disable wordpress cron server level at nginx

Problem with default wp cron job?

every page load its running. high cpu and low performance issues.

The WordPress cron is run by the wp_cron() function, which is hooked to run on the init hook, which runs on every page load.

wp_cron() is defined in wp-includes/cron.php and hooked in wp-includes/default-filters.php.

The wp_cron() function kicks off a wp_remote_post() request to /wp-cron.php. Some server configurations prevent scripts sending a request to the same domain like this however, so as an alternative you can set the ALTERNATE_WP_CRON constant to true. When enabled this redirects the user to the current URL but with ?doing_wp_cron= added to the URL, instead of the post request.

What happens if WP-Cron stops working?

WordPress, Themes, and Plugins would never know if a new version is out.
Scheduled posts would never get published, auto drafts never deleted

 

wp cron job plugins

 

WP-Cron Schedules

WP Crontrol

https://wordpress.org/plugins/wp-crontrol/

plugin-wp-cron-cron-scheduling

How to Add a Server Cron

 

root@instance-1:~# crontab -e
no crontab for root – using an empty one

Select an editor. To change later, run ‘select-editor’.
1. /bin/nano <—- easiest
2. /usr/bin/vim.basic
3. /usr/bin/vim.tiny
4. /bin/ed

open cron command

 

crontab -e

2nd

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

or

*/10 * * * * cd /var/www/example.com; php /var/www/example.com/wp-cron.php?doing_wp_cron > /dev/null 2>&1

wp rocket nginx github goal serve cached files directly without having to execute any PHP from WordPress

As you may already know, WP-Cron jobs are not real cron jobs and are executed only when you have visits on your site.

 

disable WordPress cron job,

 

add the following line to your wp-config.php: define('DISABLE_WP_CRON', true);

Then, manually a cron job every 15 minutes (it should be enough for most websites):

sudo crontab -e
0 * * * * su daemon -s /bin/sh -c "cd /opt/bitnami/apps/wordpress/htdocs/; /opt/bitnami/php/bin/php -q wp-cron.php"

 

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

or

*/15 * * * * curl https://www.website.com/wp-cron.php?doing_wp_cron &>/dev/null

or

*/15 * * * * cd /home/user/public_html; php wp-cron.php &>/dev/null

Make sure you test that your tasks still run after this change!

How to Disable WP-Cron (wp-cron.php) & use system cron for Faster Performance

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

/dev/null 2>&1 disables email notifications.

https://rajuginni.com/wp-cron.php?doing_wp_cron

*/15 * * * * cd /var/www/html/rajuginni.com/; php -q wp-cron.php

*/15 * * * * curl https://www.rajuginni.com/wp-cron.php?doing_wp_cron &>/dev/null

disable wp cron nginx

wordpress check if cron is running

root@instance-1:~# */15 * * * * curl https://rajuginni.com/wp-cron.php?doing_wp_cron &>/dev/null

schedule a post If page get published then it means WP Cron is working.

The DISABLE_WP_CRON constant is set to true. WP-Cron spawning is disabled.

open  wp-config.php:

remove or comment or set false

define(‘DISABLE_WP_CRON’, true);

define(‘DISABLE_WP_CRON’, true);

 

How to Create a Cron Job and Execute at a Given Time

1 22-5 * * *

1st minute every 22nd hour to 5 hours 10PM – to 5AM run at low peak time of website traffic.

MIN    HOUR    Day of month    Month    Day of Week    Command
0-59   0-23       1-31          1-12       0-6       linux command or script


40 18 20 04 * /home/backups/full-backup

Explanation

40 – 40th Minute 18 – 06 PM 20 – 20th Day 04 – 4th Month (April) * – Every day of the week

once a day 00AM
0 0 * * *

disable wordpress cron server level at nginx

 

add in default server or specific server location of a website.

location = /xmlrpc.php {
deny all;
internal;
access_log /dev/null;
log_not_found off;
}

 

location /wp-cron.php { deny all; internal;
access_log /dev/null;
log_not_found off; }

 

 

Primary Sidebar

wordpress tutorials for beginners advanced complete guide to run WordPress

  • wordpress speed optimization Speed up wordpress Score on Google pagespeed
  • best wordpress plugins social, seo, Backup, speed up your blog
  • TOP 10 Wordpress Themes Premium/ Free & providers
  • Wordpress Adsense Plugins & Manually
  • Social share buttons for website Wordpress Blogger
  • How to bulk delete in wordpress posts, pages, Media Images, tags and categories
  • TOP 5 Best wordpress comment plugins 2020 (disable pingback, replytocom, customize form)
  • all in one seo pack vs yoast seo pressor
  • Auto post to Facebook, twitter, Google Plus Wordpress Posts 2019
  • wordpress plugins that slow down your site and its alternatives
  • How to use wordpress tags and categories
  • Wordpress duplicate thin content Issues {FIXED}
  • how to increase wordpress memory & file upload size
  • combine rss feeds wordpress
  • Reduce the impact of third-party code ,optimize JS delivery, Minify, remove unused js, pre connect, inline, lazy load etc
  • change wordpress site url internal links in mysql command phpmyadmin
  • install wordpress on ubuntu nginx lemp command line apache debian
  • Wordpress Security Plugins 2021 (Brute force, Login lockdown, Malware scanner etc)
  • website cache best caching plugins wordpress w3tc cloudflare
  • How to add adsense amp ads to wordpress
  • wordpress password reset in 3 ways mail, phpmyadmin, mysql command
  • how i recovered hacked website site 5 times ft wordpress?
  • wordpress redirection examples Rankmath seo
  • enable browser caching in wordpress apache nginx caching headers explained
  • W3TC w3 total cache plugin setup guide review comparison with wp rocket and wp super cache
  • Wordpress database optimization (don't neglect) plugins & phpmyadmin manually
  • Optimize css delivery inline critical css, remove unused css, render blocking css
  • Converting WordPress into static website speed after 1 second dynamic 3 seconds
  • Wordpress errors and fix
  • Rules to get 100/100 in Google pagespeed web core vitalsscore
  • Install xamp & wordpress on localhost windows
  • favicon ico Change / Add / Disable favicon in wordpress Ft Genesis Theme or any theme
  • increase wordpress memory limit (how to ) 40MB , 64 MB 128 MB or 512 MB maybe 1024MB
  • wp cron job check working or not disable enable change schedule
  • google analytics plugins for wordpress #sitekit #monsterinsights gadwp back as gainwp
  • Lazy Load Adsense to improve core web vitals - Vs revenue
  • xmlrpc php wordpress uses, disable without 403 error log message
  • wordpress 304 header implement using plugin
  • wordpress change post date programmatically (auto on update like blogger
  • sorry you are not allowed to access this page. admin WordPress options table
  • clone wordpress in linux ubuntu server lemp nginx
  • Cloudflare cache rules for WordPress along with page rules cache level everything
  • wordfence-waf.php fatal error fixed after migration
  • Cloudflare page rules cache level everything redirect and sub domain
  • wordpress delete all posts from database mysql query for phpmyadmin
  • php fpm oom killer problem how to dig it.. memory pool and execution time
  • nginx wordpress multisite subdirectory multiple domains
  • Helpful Content update recovery Trying to dig it
  • How to Move a Single WordPress Site into a Multisite
  • Enable multisite in wordpress in 3 steps problems datbase error
  • Seprate single site from wordpress multisite domain based
  • Error establishing a database connection wordpress multisite
  • Add single wordpress to MultiSite wordpress
  • genesis theme cateogory customization examples
  • could not insert term into the database. wordpress
  • wordpress breadcrumbs not showing full path
  • There has been a critical error on this website fed up
  • Site structure WP categories vs sub pages or multisite posts or pages
  • WordPress pyramid structure Permalinks Category vs sub pages vs multisite

hi i am raju ginni, primalry i manage wordpress websites on GCP cloud platform as a cloud engineer, and create content on passionate things.
you can follow me on youtbe

© 2025 - All Rights Reserved Disclaimer & Privacy Policy