How to Disable WordPress Cron Handler

The wp-cron.php file on your WordPress website is responsible for automatic publishing of scheduled posts, checking of themes and plugins updates, and even sending email notifications but also causing high loads to the website. However, this can be disabled from wp-config.php file and can be manually set up in cPanel.  

1. Editing Wp-config.php File

Follow the steps below on how to add the code to wp-config.php file that disables the WordPress cron handler. 

Note:  The steps provided below are for editing the wp-config.php file via cPanel’s File Manager. Editing of wp-config.php file can be done via FTP as well. 

Step 1Log in to cPanel.  

Step 2. Click the File Manager button under Files category.  

File Manager Button in cPanel

Step 3. Access your WordPress website files and right-click on wp-config.php file. 

Wp-config File in File Manager


Step 4. Click Edit. 

Edit Wp-config File in File Manager

Step 5Click Edit on the pop-up

Wp-config File Edit Warning in File Manager

Step 6. Copy and paste the code below on line 45.  

define('DISABLE_WP_CRON', 'true');

It should appear like what is shown in the screenshot below.

Image After Adding Code to Disable Cron

Step 7. Click the Save Changes button. 

Save Changes to Disable Cron

The WordPress cron handler is now disabled. Next, set up the cron job on cPanel for the scheduled tasks of your WordPress website.  

2. Setting up Cron Job in cPanel

It’s still important to carry out the WordPress scheduled tasksThese tasks can be accomplished with cron jobs that is set up in the cPanel to avoid the slowing of your WordPress website. Follow the steps below for the setup.  

Step 1Log in to cPanel. 

Step 2. Scroll down to Advanced category and click Cron Jobs. 

Cron Jobs Icon in cPanel

Step 3. Under Common Settings, select Once Per Hour from the drop-down options. 

Cron Job Common Settings for WordPress

Step 4. Copy the code below. 

cd /home/cpanelusername/public_html; php -q wp-cron.php

Step 5. Paste it in the box provided for Command.  

Cron Job Command Field in cPanel

Note: You do not have to do anything else if this warning does not show. It means that the domain or subdomain is already connected to the WordPress Hosting.

Step 6. Click the Add New Cron Job button. 

Add New Cron Job Button in cPanel

A message showing a successful addition of cron job will show in the page. The list also displays the cron job you just added. 

Cron Job Added Message in cPanel

Please don’t hesitate to contact our 24/7 Singaporeor AustraliaSupport Team if you have further questions. 

(Visited 366 times, 1 visits today)

Was this article helpful?

Related Articles