WordPress is a very popular Content Management System (CMS). According to W3Techs, about 30% of all websites run on WordPress. But unfortunately, some of the WordPress default settings are not optimized for higher traffic websites. One setting in particular, is the intervals in which the wp-cron.php script is called. By default, the wp-cron.php script is called each time a new visitor comes to your WordPress site. Calling this script multiple times an hour is unnecessary. This can cause high resource usage on your server and crash your site. If you are using a WordPress caching plugin like WP Rocket to increase page load speeds and still experiencing problems, then it might be time to reduce resource usage on your server by only calling your wp-cron.php script every few hours. Here’s how to disable the default wp-cron.php in WordPress, reduce server resources and help speed up your WordPress website.

NERD NOTE: What exactly does the wp-cron.php script do? The wp-cron.php file contains a list of scheduled tasks for WordPress. These automated tasks include things like publishing your scheduled posts or checking for updates for plugins or themes.

1Take Control Away From WordPress

Before you can specify wp-cron settings at the server level, you need to tell WordPress to not worry about it anymore in the wp-config.php file.

  • Open your wp-config.php file using either your cPanel File Manager or an FTP program.
  • Scroll to the bottom of the database settings in the wp-config.php file.  It should be around line #40.
  • Add the highlighted line code below on a separate line right after define(‘DB_COLLATE’, ”);

** The Database Collate type. Don’t change this if in doubt. */
define(‘DB_COLLATE’, ”);
define(‘DISABLE_WP_CRON’, true)

By default, WordPress will automatically run the wp-cron.php script every time a new visitor comes to your site. By disabling this, you giving your server a rest.

2Disable Wp-Cron.php And Manually Control Cron Jobs

How To Speed Up WordPress
Image elements via alan9187 and typographyimages