WordPress features an integrated scheduling system called WP-Cron, which manages tasks like publishing posts at designated times, sending automated emails, and performing backups.
Although WP-Cron is user-friendly and effective for many sites, it has some drawbacks. A frequent problem is that it may overlook scheduled tasks, particularly on websites with low visitor traffic.
A more dependable solution is to implement standard cron jobs through your web hosting provider’s server. These cron jobs operate independently of website traffic and follow a strict schedule, ensuring that tasks are completed reliably and punctually.
At CanadaCreate, we utilize standard cron jobs configured directly on our server to guarantee that all scheduled tasks are performed on time, resulting in consistently excellent performance. This approach alleviates concerns about delays or missed tasks, even during times of low traffic or high server load.
In this article, we will guide you through the process of disabling WP-Cron in WordPress and present two methods for setting up standard cron jobs.
Reasons to Disable WP-Cron
WordPress features an integrated scheduling system known as wp-cron, which handles time-sensitive tasks such as checking for updates, publishing scheduled posts, automating regular backups, sending triggered emails, and more.
Discover more about managing WordPress cron jobs in our comprehensive guide.
The challenge with WordPress is that it only checks for scheduled tasks when a visitor accesses your site. While this is sufficient for many websites, it can lead to issues for those with lower traffic.
For instance, if your site experiences low traffic, scheduled posts may not be published as intended. Conversely, high-traffic sites will trigger wp-cron checks more frequently, potentially affecting overall performance.
If you’re looking to resolve the issue of missed scheduled posts, consider using the free plugin Missed Scheduled Publisher. However, for a complete solution to all scheduling problems, implementing a real cron job is necessary.
A real cron job is executed by your web hosting server’s operating system rather than by WordPress itself, allowing for more reliable task scheduling. Although WordPress does not have built-in capabilities to set this up at the server level, you can easily configure it by following our step-by-step tutorial.
In this tutorial, we will explore how to effectively disable wp-cron and configure a proper cron job for improved performance.
- How to Disable wp-cron in WordPress
- Step 1: Configure a Proper Cron Job on Your WordPress Hosting
- Step 2: Set Up a Cron Job Using a Third-Party Service
- Bonus: Automatically Schedule Your WordPress Blog Posts
Disabling wp-cron in WordPress
To disable wp-cron, you will need to modify the wp-config.php file, which is an essential configuration file for WordPress. This file is located in the root directory of your WordPress site, and you can access it using an FTP client or the file manager provided by your web hosting service.
This file contains critical information, and incorrect modifications can disrupt your WordPress site. It is advisable to create a backup of the file before making any changes. You can refer to our guide on how to edit wp-config.php in WordPress for assistance.
Insert the following code into the wp-config.php file just above the line that reads, ‘That’s all, stop editing! Happy blogging’:
define('DISABLE_WP_CRON', true);
This is how it should appear.
After completing the changes, save the file and upload it back to your website.
WordPress will no longer activate wp-cron when someone visits your site.
Step 1: Configure a Proper Cron Job on Your WordPress Hosting
Next, you need to configure a proper cron job to manage your scheduled tasks. The method for doing this will depend on the features offered by your WordPress hosting provider.
The simplest way to set up cron jobs is by using cPanel, a widely-used website control panel included with many web hosting services, such as Bluehost. This tutorial will demonstrate using the Bluehost cPanel.
Important Note:Some web hosting providers do not use cPanel, and some may not permit you to create cron jobs. If you’re unsure, reach out to your hosting provider or review their support documentation. Alternatively, you can consider using a third-party cron service (see method 2).
Once you log into your hosting account, navigate to the ‘Websites’ page and select the ‘Advanced’ tab at the top.
Scroll down to the ‘Cron Jobs’ section and click the ‘Manage’ button next to it. Please note that the location of this section may differ based on your hosting provider.
This will direct you to a new page where you can create new cron jobs.
Don’t be concerned about the warning regarding the need for Linux command knowledge. You’ll only need one command, which we will provide for you below.
If necessary, you can update the email address for receiving cron job notifications. The default address is the one associated with your web hosting account, which is suitable for most websites.
Next, scroll down to the ‘Add New Cron Job’ section to create your cron job.
First, decide how frequently you want the cron job to run. You can choose any interval, but we suggest setting it to every 30 minutes.
Click the ‘Common Settings’ button and select a time interval from the dropdown menu. ‘Twice Per Hour’ is a recommended option for most sites if you’re unsure.
Now, input the command that instructs WordPress to execute its scheduled tasks. Paste the following code into the ‘Command’ field:
wget -q -O - https://example.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1
Be sure to replace ‘example.com’ with your own website’s URL.
After completing that, click the ‘Add New Cron Job’ button, and you’ll see the new cron job listed below.
WordPress will now execute scheduled tasks every 30 minutes instead of triggering them when someone visits your site.
Method 2: Setting Up an Effective Cron Job with a Third-Party Service
If your hosting plan lacks proper cron job support or is challenging to configure, you can opt for a third-party cron service.
These dedicated services provide an easy-to-use interface for setting up cron jobs. Here are some of the top options:
- EasyCron offers a free plan that requires monthly renewal.
- cron-job.org is a completely free service.
- Cronitor is free if you only need to set up one cron job.
- SetCronJob has paid plans starting at $10 per year.
For this tutorial, we will use EasyCron due to its user-friendly interface and the suitability of its free plan for most beginners.
After creating a free account, you can set up a new cron job by clicking the ‘+ Cron Job’ button on the left.
This action will bring up the ‘Create Cron Job’ screen. First, paste the following URL into the ‘URL to call’ field:
https://example.com/wp-cron.php?doing_wp_cron
Be sure to replace ‘example.com’ with your own website’s URL.
Next, select ‘Every 30 minutes’ from the ‘When to execute’ dropdown menu. Once you finish, remember to click the ‘Create Cron Job’ button to save your settings.
The new cron job will be added to your list and will execute wp-cron on your website every 30 minutes.
Bonus: Automatically Schedule Your WordPress Blog Posts
With the proper cron jobs set up, all scheduled tasks on your WordPress blog will run smoothly. You can even automate the scheduling of your blog posts.
This feature allows you to select an article to publish at random on your chosen publication date. To enable this, install and activate the PublishPress Planner plugin.
After activation, go to thePlanner » Settingspage and navigate to the ‘Content Calendar’ tab at the top. Here, check the ‘Scheduled’ box next to the ‘Statuses to display publish time’ option.
Then, select 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 prompt you to choose the specific time, hour, and minute for your scheduled posts to be published daily. For more tips, check out our tutorial on the best times to publish a blog.
Click the ‘Save Changes’ button to apply your new settings.
Next, navigate to the block editor and choose the ‘Scheduled’ option from the ‘Post Status’ dropdown menu.
For additional details, check out our guide on how to automatically schedule your WordPress blog posts.
We hope this guide has helped you understand how to disable wp-cron in WordPress and set up effective cron jobs. You might also find our tutorial on adding an admin user in WordPress via FTP and our beginner’s guide on managing cron jobs useful.
If you enjoyed this article, please subscribe to our YouTube Channel for WordPress video tutorials. You can also connect with us on Twitter and Facebook.



