How to Disable the wp-cron.php File for Your WordPress Site Using cPanel

How to Disable the wp-cron.php File for Your WordPress Site Using cPanel

If you know a little bit about WordPress, it has a core file called wp-cron.php which controls cron jobs or scheduled tasks of the site.

You can schedule your blog posts in WordPress, check the theme and plugin updates, send the email notifications. WordPress cron file handles such type of scheduled tasks.

The worst thing is every time someone visits your site, WordPress checks for scheduled tasks, and it can be overwhelming on a high traffic website.

Sometimes, cron jobs can drain the server and CPU resources, which may lead to website downtime. Suppose you get few thousand visitors every day, and WordPress calls the wp-cron.php file the same number of times as your visitors, won’t that be bad?

So, to fix this, you can disable the wp-cron.php file using cPanel. You should keep in mind; no scheduled task works after you disable the cron file.

Well, if you use any plugin to send automated emails, it works, but not the scheduled blog posts which WordPress handles.

Use the wp-config.php File to Disable the wp-cron.php File

As you already know, wp-config.php is one of the most vital files for a WordPress website, and it controls the connection between the site’s data and the database.

Adding a one-line code can solve the problem. I hope you know how to edit the wp-config.php file. If not, follow the step by step process.

Step 1:

Login to your web hosting cPanel account and open the file manager.

You may already know that the data of your WordPress website resides in the file manager.

How to Disable the wp-cron.php File for Your WordPress Site Using cPanel

You may find it under the Files’ section. Some companies offer a separate file manager icon. Depending on the company you use, you may also see the different design layout of cPanel.

Don’t fret, search a bit and you can easily find the file manager.

Step 2:

On this new page, you have to make sure, you open the public_html directory because your WordPress installation resides here.

 

How to Disable the wp-cron.php File for Your WordPress Site Using cPanel

If you host multiple websites, you might see their folders in the directory. For a primary domain, you need to stay at the root directory/public_html.

When you open the file manager, you may see the home directory, click on public_html from the left-hand sidebar to open it.

Step 3:

Scroll down and search for wp-config.php. Right-click to edit.

You can also use the standard Edit option from the main navigation menu of cPanel.

How to Disable the wp-cron.php File for Your WordPress Site Using cPanel

Step 4:

A popup appears to confirm your decision to edit the wp-config.php file.

Click on the Edit button, and you can see a new tab on the browser.

How to Disable the wp-cron.php File for Your WordPress Site Using cPanel

Step 5:

Don’t be scared because of coding lines, you don’t need to touch any. All you need to do is copy and paste the code shown below.

You should try finding if there is any similar code available. Otherwise, use it.

define('DISABLE_WP_CRON', true);

Click on Save Changes. Congrats you have successfully disabled the wp-cron.php file of your WordPress website.

Note: Before you make any changes, it’s essential to back up your website and its database.

If you see anything wrong with your site, you can remove the code and seek an alternative to reduce the CPU usage. For a small website, disabling the cron job can save you the cost of upgrading your web hosting plan for a few days.

But if you run a big website, you may need to buy a paid CDN or upgrade the web hosting server.

I Hope You Have Understood the Concept of Cron Jobs

Now and then, people complain about excessive use of CPU and their web hosting companies asking for more money to upgrade an account.

Well, you can’t rely on your web hosting customer support to fix the issues related to CPU usage. Although, if you’re lucky, they can tell you the reasons, the solutions may be different.

Not everyone is a WordPress expert. Learning about disabling the cron jobs is essential. You will be happy to know; you can control the cron jobs timing using cPanel.

Conclusion

The above tutorial is about disabling the cron jobs, but some WordPress users change the default cron jobs timing. As I have mentioned earlier, WordPress calls the wp-cron.php file every time someone visits the website, but if you disable the file, CPU usage lowers down.

The website performance plays a vital role in maintaining a good user experience. So, it’s important to learn about cron jobs and disable them when you see high CPU usage.

Check out these top 3 WordPress hosting services:

A2 Hosting
£1.49 /mo
Starting price
Visit A2 Hosting
Rating based on expert review
  • User Friendly
    4.5
  • Support
    4.0
  • Features
    4.5
  • Reliability
    4.8
  • Pricing
    4.0
IONOS
£0.76 /mo
Starting price
Visit IONOS
Rating based on expert review
  • User Friendly
    4.5
  • Support
    4.0
  • Features
    4.5
  • Reliability
    4.5
  • Pricing
    4.3
Webdock
£0.80 /mo
Starting price
Visit Webdock
Rating based on expert review
  • User Friendly
    3.8
  • Support
    4.5
  • Features
    4.5
  • Reliability
    4.3
  • Pricing
    4.3

How to Limit or Disable Pages and Posts Revisions of a WordPress Website Using cPanel

When a WordPress website faces poor performance issues, it's required to disable
less than a minute
Bruno Mirchevski
Bruno Mirchevski
Hosting Expert

How to Optimize WordPress Database Using WP-Sweep

This how-to guide will explain about the use of WP-Sweep WordPress plugin to opt
less than a minute
Eliran Ouzan
Eliran Ouzan
Web Designer & Hosting Expert

How to Fix Render-Blocking JavaScript and CSS of Your WordPress Website

Whenever you check the page loading time, you may see a suggestion to fix render
less than a minute
Bruno Mirchevski
Bruno Mirchevski
Hosting Expert

How to Delete Extra Database Tables After Uninstalling a WordPress Plugin

Not all the plugins come with an option to delete all the settings
less than a minute
Max Ostryzhko
Max Ostryzhko
Senior Web Developer, HostAdvice CTO
HostAdvice.com provides professional web hosting reviews fully independent of any other entity. Our reviews are unbiased, honest, and apply the same evaluation standards to all those reviewed. While monetary compensation is received from a few of the companies listed on this site, compensation of services and products have no influence on the direction or conclusions of our reviews. Nor does the compensation influence our rankings for certain host companies. This compensation covers account purchasing costs, testing costs and royalties paid to reviewers.
Click to go to the top of the page
Go To Top