Loading...

Knowledge Base

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.

 

  1. Log in to cPanel.
  2. Click the File Manager button under Files category.

    Screenshot of VD WordPress Cron Handler cPanel File Manager

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

    Screenshot of VD WordPress Cron Handler wpconfig File
     
    TIP:
     

     
  4. Click Edit.

    Screenshot of VD WordPress Cron Handler wpconfig Edit Option

     
  5. Click Edit on the pop-up.

    Screenshot of VD WordPress Cron Handler wpconfig Edit Icon in Popup

     
  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.

    Screenshot of VD WordPress Cron Handler Disable Cron Code

     
  7. Click the Save Changes button.

    Screenshot of VD WordPress Cron Handler Code Save Changes Button


    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 tasks. These 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.

  1. Log in to cPanel.
  2. Scroll down to Advanced category and click Cron Jobs.

    Screenshot of VD WordPress cPanel Cron Jobs Icon

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

    Screenshot of VD WordPress Add New Cron Job Common Settings Page

     
  4. Copy the code below.
     
    cd /home/cpanelusername/public_html; php -q wp-cron.php

     
  5. Paste it in the box provided for Command.

    Screenshot of VD WordPress Cron Job Command Box
     

    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.


     
  6. Click the Add New Cron Job button.

    Screenshot of VD WordPress Add New Cron Job Button


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

    Screenshot of VD WordPress Cron Job Successfully Added Prompt
     

 

Please don’t hesitate to contact our 24/7 Singapore or Australia Support Team if you have further questions.

 

 

 

 

Did you find this article helpful?

 
* Your feedback is too short

Loading...