Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

How to Disable wp-cron in WordPress and Set Up Proper Cron Jobs

WordPress includes a built-in scheduling system known as WP-Cron, which is responsible for managing scheduled tasks such as publishing posts at a specific time, sending triggered emails, or running automated backups.

While WP-Cron is convenient and works well for many websites, it does have limitations. One common issue is that it sometimes misses scheduled tasks, especially on sites with low traffic.

A more reliable alternative is to set up proper cron jobs managed by your web hosting provider’s server. These cron jobs are independent of site visits and run on a precise schedule, ensuring tasks are executed consistently and on time.

At WPBeginner, we rely on proper cron jobs set up directly on our server to ensure that all our scheduled tasks are executed on time, and this approach has consistently delivered excellent results for us. This means we don’t have to worry about delays or missed tasks, even during periods of low traffic or high server activity.

In this article, we will show you how to easily disable wp-cron in WordPress and cover two ways you can set up proper cron jobs.

How to Disable wp-cron in WordPress and Set Up Proper Cron Jobs

Why Disable wp-cron?

Your WordPress website has a built-in scheduling system called wp-cron. It performs time-sensitive tasks such as checking for updates, publishing scheduled posts, automatically creating regular backups, sending triggered emails, and more.

You can learn more in our guide about how to view and control WordPress cron jobs.

Viewing Scheduled Tasks in WordPress

The problem is that WordPress is only prompted to check for scheduled jobs when someone visits your website. This works well enough for most sites, but sometimes it can cause problems for smaller ones.

For example, if your site has low traffic, then your scheduled posts may not be published on time. If your website gets a lot of traffic, then wp-cron will be checked frequently, which may impact your website’s performance.

Now, if you just want to fix the missing scheduled posts error, then you can use the free plugin Missed Scheduled Publisher. But if you want to solve all scheduled action issues, then you need a real cron job.

A real cron job is run by your web hosting server’s operating system, not by WordPress. You can set it up to check for scheduled tasks more reliably. By default, WordPress doesn’t have access to set this up on the server level, but you can easily do it by following our tutorial.

That being said, let’s take a look at how to easily disable wp-cron and set up a proper cron job. Here’s what we will cover in this tutorial:

Disabling wp-cron in WordPress

To disable wp-cron, you need to edit wp-config.php, which is a core WordPress configuration file. It’s located in your WordPress site’s root folder, and you will need to use an FTP client or the file manager in your web hosting control panel.

This file contains a lot of sensitive information, and making the wrong changes can break your WordPress site. We recommended making a backup of the file first, just in case. You can learn how by following our guide on how to edit wp-config.php in WordPress.

You’ll need to paste the following code into the wp-config.php file just before the line that says, ‘That’s all, stop editing! Happy blogging’:

define('DISABLE_WP_CRON', true);

This is what it should look like.

Pasting Code into wp-config

After that, save the file and upload it back to your website.

WordPress will no longer trigger wp-cron when someone visits your website.

Method 1: Setting Up a Proper Cron Job on Your WordPress Host

Now, you’ll need to set up a proper cron job to run your scheduled tasks. The way you do this will vary depending on the tools provided by your WordPress hosting provider.

The easiest way to set up cron jobs is using cPanel, a popular website control panel included with many web hosting plans, including Bluehost. We will use the Bluehost cPanel in this tutorial.

Note: Some web hosts don’t use cPanel, and some may not even allow you to create cron jobs. If in doubt, you should contact your hosting provider or consult their support documentation. You can always use a third-party cron service (check method 2).

Once you log into your hosting account and head to the ‘Websites’ page, switch to the ‘Advanced’ tab from the top.

Here, scroll down to the ‘Cron Jobs’ section and click the ‘Manage’ button next to it. Keep in mind that the position of this section can vary depending on your hosting provider.

Click the Manage button in the Cron Jobs section

This will take you to a new page where you can create new cron jobs.

Don’t worry about the warning you’ll see about needing a good knowledge of Linux commands. Only one command is necessary, and we will show you exactly what it is below.

If you need to, you can change the email address where cron job notifications will be sent. The default address is the one you used when you signed up for your web hosting, and this will work fine on most websites.

You can change the cron email and click Update

Now, let’s scroll down to the ‘Add New Cron Job’ section and set up a cron job.

First, you need to decide how often the cron job will be run. This can be anything you like, but we recommend 30-minute intervals.

You will need to click the ‘Common Settings’ button and select a time interval from the dropdown.’ Twice Per Hour’ is a good choice for most sites if you’re not sure.

Creating a New Cron Job in cPanel

Now, you can enter the command that will ask WordPress to run its scheduled tasks. You need to paste the following code into the ‘Command’ field:

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

Make sure you replace ‘example.com’ with your own website’s URL.

Once you’ve done that, click the ‘Add New Cron Job’ button, and you will see the new cron job added to the list below.

Viewing the List of Cron Jobs in cPanel

WordPress will now check for and run scheduled tasks every 30 minutes instead of when someone visits your website.

Method 2: Setting Up a Proper Cron Job Using a Third-Party Service

If your hosting plan doesn’t offer proper cron jobs, or they are difficult to set up, then you can use a third-party cron service instead.

These are dedicated services that allow you to set up cron jobs using a simple interface. Here are a few of the better ones:

For this tutorial, we will use EasyCron because it is easy to use, and the free plan is suitable for most beginner use cases.

Once you create a free account, you can create a new cron job by clicking the ‘+ Cron Job’ button on the left.

Creating a New Cron Job in EasyCron

This will pop up the ‘Create Cron Job’ screen. First, you need to paste the following URL into the ‘URL to call’ field:

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

Make sure you replace ‘example.com’ with your own site’s URL.

Creating a New Cron Job in EasyCron

After that, you should choose ‘Every 30 minutes’ from the ‘When to execute’ drop-down. When you’re finished, don’t forget to click the ‘Create Cron Job’ button to store your settings.

The new cron job will be added to the list and run wp-cron on your website every 30 minutes.

Viewing the List of Cron Jobs in EasyCron

Bonus: Auto-Schedule Your WordPress Blog Posts

Once you have set up proper cron jobs, all your scheduled tasks on the WordPress blog will be performed without a hitch. You can even auto-schedule your blog posts.

This will allow you to pick an article to publish randomly on your pre-selected publication date. To do this, you must install and activate the PublishPress Planner plugin.

Upon activation, visit the Planner » Settings page and switch to the ‘Content Calendar’ tab from the top. Here, check the ‘Scheduled’ box next to the ‘Statuses to display publish time’ option.

Select the Scheduled status

After that, you have to choose a time format for your post’s publication and click the field next to the ‘Default publish time for items created in the calendar’ option.

This will open a prompt from where you can pick the specific time, hour, and minute for your scheduled posts to be published daily. For ideas, you can see our tutorial on when is the best time to publish a blog.

Then, click the ‘Save Changes’ button to store your settings.

Choose a time for the publication of the scheduled posts

Now you can head to the block editor where you can select the ‘Scheduled’ option from the ‘Post Status’ dropdown menu.

For more information, see our tutorial on how to auto-schedule your WordPress blog posts.

Schedule your WordPress blog post

We hope this tutorial helped you learn how to disable wp-cron in WordPress and set up proper cron jobs. You may also want to see our tutorial on how to add an admin user in WordPress with FTP and our beginner’s guide on how to view and control cron jobs.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

12 CommentsLeave a Reply

  1. Jiří Vaněk

    Thank you for the specific steps. I used method 1, where I disabled CRON via wp-config, and since I have my own server, there was nothing stopping me from using the server’s CRON for scheduled tasks. The only thing I wasn’t sure about before was which URL to use for CRON. So, thanks also for the specific command that I could input into CRON.

  2. Phil Daley

    I have a woocommmerce site that needs to run another cron job every 5 minutes
    If I follow method 1 – do I need to set wp_cron.php to run at least ever 5 minutes as well (or faster)? or will every 30 minutes still be ok?

    • WPBeginner Support

      The method in our article would affect all of the cron jobs on your site. When you need a specific cron job to happen more often, we would recommend checking with the support for what needs the cron job and they can assist with setting it up!

      Admin

  3. kzain

    This is a great post! Disabling wp-cron and using external cron jobs is something I’ve been considering for a while to improve website speed. The clear instructions on disabling wp-cron and setting up external jobs are awesome. Thanks for sharing!

  4. Paula Coombes

    Hello,
    I’d just like to say thank you so much for this straightforward help.
    I used Method 1.
    I’ve carried out your instructions after reading everything at least 3 times and, for the first time ever, my WP health state has no problems!! :) :) :)
    Thanks again.

    • WPBeginner Support

      You’re welcome, glad our guide was helpful! :)

      Admin

  5. Beth Alexander

    Is there a way to check that the new corn job running from Control Panel is working?

  6. Anita Richards

    I am confused.

    Woocommerce recommends setting the command as without the “?doing_wp_cron” part.

    What is the difference?

    • WPBeginner Support

      Unless we hear otherwise, the ?doing_wp_cron allows for some background processing that without would not be able to do.

      Admin

      • Anita Richards

        Ok, that makes some sense. I guess that it must be the difference between the WP and Woo processes being run?

        I ended up creating two corn jobs in cPanel one with and one without. Is that going to cause problems?

        • WPBeginner Support

          It should be a slightly different method to achieve the same result.

          It would depend on your site’s size for how multiple cron jobs would affect your hosting site, as your site becomes larger it may become an issue

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.