How to Disable WP-Cron For Faster Performance

Do you know that disabling WP-Cron can make your website load faster than before? It can also help you solve many WordPress timeout errors.

In this article, we explore how to disable WP-Cron for faster performance.

I was frequently getting an HTTP 503 error on one of my websites. I discovered that it was due to a timeout error.

When I contacted the support team, they responded saying that the wp-cron was causing the issue. The Wp-cron.php was taking more time to execute, so I got a timeout issue showing the 503 error.

The error gave me a lot of headaches, and the bounce rate was hovering around 70%, which was alarming.

So, I went ahead and decided to turn off the WP-Cron job. So, in this article, I will explain how to disable WP-Cron for better performance.

What Is WP-Cron

Cron Jobs are scheduled tasks that WordPress runs at scheduled intervals. This includes publishing posts on a scheduled date, checking for updates, taking backups automatically, or performing any automated work.

Cron Jobs make our lives easy by automating the whole process. That’s fun. Right?

If you run an affiliate website like an Amazon affiliate store, cron jobs are necessary. Cron jobs ensure that all products’ prices are synchronized and updated whenever there is a change on the Amazon website. It’s next to impossible to search prices and update them manually.

In WordPress, cron jobs are handled by WP-Cron, which is a PHP file named wp-cron.php. The PHP file will run a script to update the website data at the front end whenever there is an update.

This wp-cron.php may be used by many plugins, and this file must run the script numerous times. So, a useful automation feature can become a burden if it is not handled carefully.

Why Do We Need To Disable WP-Cron?

  • Excessive Use of WP-Cron can trigger 503 Errors
  • Hampers website speed
  • Poor visitor experience
  • Bump in bounce rate and conversion
  • Poor SERP ranking

How Does WP-Cron Affect WordPress Performance?

Nowadays, many plugins depend on WP-Cron to update content on your website. There is a high chance that, at times, WP-Cron will be overloaded.

The website’s performance is affected when multiple plugins try to access a single file.

On the flip side, even though you have fewer plugins, those few can also trigger the script continuously, which will, in turn, slow down the website.

So, it is a must to disable WP-Cron for faster performance.

Do you know that WP-Cron can slow down your website even if you have very little traffic? We will explain how WP-Cron can affect performance in the following scenarios.

Websites Getting Very Huge Traffic

If a website gets many visitors, the WP-Cron will always be busy running the script as it has to do multiple tasks at the back end.

Due to overload, it will sometimes wait for PHP workers, as they might be busy with other jobs. Once a PHP worker is free, they will run the WP-cron. Till that time, you will have to wait, and your website will also wait to load.

Websites Getting Very Little Traffic

You must be wondering how it can affect website performance, which gets very little traffic. It’s unfortunate, but a fact. WP-Cron can also badly affect a new website with very little traffic.

A Cron job only runs when the page loads. If there is very little traffic to a website, frequent page loading won’t happen, and as a result, Cron schedules will be missed.

That’s why, if you open a website after some time, you will notice that it loads very slowly. One reason is the pending cache buildup, and the other is the pending cron jobs.

WordPress Cron Vs System Cron

Do you know that WP-Cron is not a real cron? WordPress created it to mimic the system cron. WordPress is not confident that the System cron will run as and when required.

So, they created their cron to do the job. But all jobs that a WP-cron does can be done by a system cron, too.

The benefit is that we can control the system cron. Ideally, we need to disable WP-Cron and run the system cron periodically for better performance.

So, System Cron will update the website after a certain amount of time, regardless of whether it is getting triggered by WordPress.

How To Disable WP-Cron?

Disabling WP-Cron is straightforward. This can be done using any of the following methods.

  • Adding a piece of code
  • Using a WordPress plugin

Adding A Piece Of Code

To disable WP-Cron, you need to open the WP-config.php file located in the WordPress root directory. Then add the below piece of code just before the line that says, “That’s All, Stop editing! Happy Blogging.”

Once you save the file, it will disable WP-Cron from running on page load.

define('DISABLE_WP_CRON', true);

Using A WordPress Plugin

If you are uncomfortable adding codes, try the WP Control plugin to turn off default WordPress Cron jobs. You can edit, delete, or add Cron jobs using this plugin.

You can also control how frequently cron jobs are executed. In other words, using this plugin will give you full control of the WordPress Cron job.

How to disable wp-cron

How To Create A System Cron?

A dedicated command is available in almost all web hosting control panels to add system Cron jobs.

You can also use a command-line interface to add Cron jobs, but that’s not easy if you are not a technical person. Hence, that process is not discussed here.

We will discuss adding Cron jobs using the C Panel.

How To Add Cron Jobs In The C Panel?

For most of us who use shared hosting, cPanel comes by default to control our web space. The C panel has a dedicated option for creating Cron jobs.

  • Log in to the “C Panel” dashboard
  • Go to the” Advanced” section
  • Click on” Cron Jobs
  • Enter all information required
  • Under “Common settings, “select “Twice per hour. “[ You can choose the interval you want]
  • Click “Next.
  • Enter the corn job code. If you are not sure, ask your web host.
wget -q -O - https://domain.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1 [ This is just a sample ]
How to disable wp-cron
How to disable wp-cron

FAQ: How To Disable WP-Cron?

What Is WordPress Cron?

WordPress Cron or WP-Cron is an automation feature in WordPress that automates different tasks when a page loads and is served to visitors.

Plugins and themes can use WP-Cron to automate different tasks at different intervals.

How Do I Disable Cron In WordPress?

You can turn off cron in WordPress by adding the following code to theΒ wp-config.phpΒ fileΒ in the WordPress root directory.

define(‘DISABLE_WP_CRON’, true);

Should I disable WordPress Cron?

If you care about your website speed, use WordPress rather than SystemCon. Both do the same job, but a system cron does not affect your website performance and does not count on your CPU utilization.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top