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.
You may already know that the data of your WordPress website resides in the file manager.
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.
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.
You can also use the standard Edit option from the main navigation menu of cPanel.
Click on the Edit button, and you can see a new tab on the browser.
You should try finding if there is any similar code available. Otherwise, use it.
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.
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:
- Click here to get the best wordpress hosting specialized for wordpress.