Build Your Own Blog Like This One

Building a Blog Has Never Been so Easy! Mobile Optimized and Easy -to-add
Disable Wordpress Cron and Improve Your Website Performance

Disable Wordpress Cron and Improve Your Website Performance

Learn what WordPress Cron is, how it can affect your website's performance, and the steps to fix it.

If you have noticed that your WordPress site is slow, it is possible that it is a problem in the Wordpress Cron itself.

Disabling this tool is the solution and does not require further technical knowledge. But, if you don't know what it is and how to achieve it, then you will find the detail.

What is the WordPress Cron?

It is a process that activates the automatic execution of the tasks that have been programmed to be carried out in your Wordpress account.

Said process generated by the Wordpress Cron, is executed every time a user visits your website, as a way of verifying and fulfilling pending tasks.

It relies on a file called wp-cron.php located in the root directory of your site. Although it is normally a secure file, it can be susceptible to computer attacks that impair the performance of your website.

How Does WordPress Cron Work?

The term Cron comes from the UNIX operating system and is actually a program, also called a Daemon, that runs in the background to manage processes.

These are responsible for activating processes that must be carried out at certain times. The word Cron comes from the Greek chronos which means "time", hence its activation is carried out on certain dates and times.

However, the WordPress Cron is considered a pseudo-cron because the event that triggers it is not the day and time, but when a site visit occurs.

The activities are stored in databases and even if you schedule the execution of the task for a certain moment, it will not be executed until the visit criteria is met.

This makes it less efficient, since a regular cron can perform the process at a time that is most convenient for the best performance of the software it works with.

How Does WordPress Cron Affect Website Performance?

There are multiple ways in which a WordPress website can be affected in performance due to Cron. Among them are:

The traffic

Both low and excessive traffic can affect the website. When the traffic is very low, it is possible that Wordpress does not activate the wp-cron correctly and if it is very high it can present a major failure due to the consumption of resources.

The tasks of templates and plugins

If any type of error occurs at the time a scheduled task belonging to a plugin or theme is executed, all of them will stop working.

malware

If during the installation of a plugin or theme, some kind of malicious code sneaks in, both scheduled tasks and other Wordpress processes can stop working.

Interference with security tools

Some security tools like firewalls, DNS, HTTPS protocols, .htaccess rules, IP restrictions, among others, can block Wordpress cron processes.

the cache

Because the Wordpress cron depends on the interaction with the website, the cache can inhibit any updates and prevent the activation of scheduled tasks.

web servers

Some servers limit these processes to give priority to others of greater relevance and not drop the development of the site. Also, when some process takes more time than it should, the server can block it to free up resources.

Missing or modified wp-cron.php file

The wp-cron.php file is part of the system, therefore it should not be modified or deleted. If you suspect that something has happened to this file, you can request the help of your hosting provider's support service.

Importance of Wordpress Cron

The truth is that the Wordpress cron fulfills a function of vital importance, since it is responsible for executing the scheduled tasks within the platform.

They are responsible for reviewing the updates required by the core of Wordpress, as well as its plugins and themes.

They also publish scheduled articles, send emails for platform maintenance, activate system cleaning, backups and delivery of internal notifications.

In addition, the Wordpress cron is responsible for executing the scheduled tasks required by plugins and themes, among many other processes.

How to Know if Wordpress Cron Stopped Working?

There are some signs that may indicate that the Wordpress cron has stopped working. The first of these is the occurrence of the “Scheduling Missed Error” after an activity that you have scheduled has not been executed.

Although it is not the only cause of this error, it is certainly the most common.

Another of the common signs is the reduction in the loading speed of the site, due to excessive consumption of resources that prevent the development of activities.

Why is it necessary to disable the WordPress Cron?

If you have determined that the Wordpress cron is affecting the performance of your site, it is best to disable it. In this way you will not lose the productivity of the site and you will continue to offer a good experience to users.

If you have cPanel based hosting, you can leave this task to the server to make it much more efficient since this is a real cron. First we will explain how to deactivate it in Wordpress and then how to activate it in your hosting account.

How to Disable WordPress Cron?

Deactivating this service is very simple, it is only necessary to follow the following steps:

  1. Open the “File Manager” or “File Manager” in the “Files” section of your cPanel.
  2. Access the “public_html” folder.
  3. Locate and open the “wp-config.php” file.
  4. Add in the final section of the file, the code:

define('DISABLE_WP_CRON', true);

right before:

define( 'WP_DEBUG', false );

  1. Save the changes and in this way the Wordpress cron will be disabled.

How to Work with the Hosting Account Cron?

It's very simple, just follow these steps:

  1. Within cPanel, locate the “Advanced” or “Advanced” section.
  2. Find the icon called “Cron Jobs” and double-click it.
  3. In the form you must indicate the type of activity you want to schedule and the schedules.
  4. In the “Command” field add the code only replacing the phrase “yourdomain.com” with the domain name you use:

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

  1. Press a click on the “Add New Cron Job” or “Add New Cron Job” button and voila, you will have configured the server to take control and the performance of your website does not drop.

Conclusion

Some problem with the Wordpress Cron could be the cause that your site has lost loading speed and that your scheduled tasks are not executed correctly.

Due to the way it works, Wordpress Cron is very inefficient. It is for this reason that the ideal is to deactivate it and leave the activity to the web server that works under another class of events.

High or low volume of traffic, malfunctioning of themes and plugins, as well as the presence of malicious code, interference of security tools, caching, blocking of web servers and problems with the wp-cron.php file can be the cause. cause of its failure.

Both the deactivation of the Wordpress Cron and the activity of Cron Jobs in your Hosting Account, are activities that you can carry out even without knowing programming. It is only required to strictly follow the steps as detailed.

If this content has been useful to you, do not forget to share it. ;-)

Buscar