How To Speed Up WordPress By Disabling WP-Cron

SkyStra
Jun 28, 2019

To publish scheduled posts or to update themes and send notifications through emails, WordPress makes use of a file known as wp-cron.php. It is also used to check for plugin updates.

NOTE: If you are on our WordPress service, you are totally fine leaving wp-cron the way it is. We’ve optimized our platform for it.

Using the system Cron has better performance compared to WP-Cron. Generally, the WP-Cron affects performance because it runs every time someone visits your WordPress website. On a platform that isn’t optimized, it causes a system traffic jam.

WP-Cron Performance

WP-Cron is not a genuine Cron job; it only imitates the work that is performed by the system Cron. WordPress is designed in a way that it calls the wp-cron.php when a person visits your site or when there is a task that has been scheduled. Normally, this is what you’d want to happen. However, when you have a busy website, you are adding a lot of processes that are unnecessary to your website, slowing it down considerably.

To solve this problem, you need to disable the WP-Cron and use the system Cron. This is recommended since the system Cron runs when it is scheduled.

Disabling WP-Cron 

To disable the WP-Cron, you need to include the line below to your wp-configure.php file. By so doing, it will stop the WP-Cron from running when loading a page but not by calling it directly through wp-cron.php. To do so, follow these steps.

  • Open wp-config.php through the FTP or Panel File Manager.
  • Around line 37 of the database settings, add the following code:
 define(‘DISABLE _WP_CRON', true);

Then click Save to store the changes.

Leave a Reply