Disable wp-cron.php in WordPress

WordPress uses a file called wp-cron.php that is causing high loads to the website because it acts as virtual cron job that automatically publishes scheduled posts, checks for theme and plugins updates, and even sends email notifications. In order to avoid this known issue with WordPress, you can disable wp-cron.php. Please follow the steps below:

Disable wp-cron.php behavior through wp-config.php

We can easily tell WordPress to let us handle the execution of wp-cron.php with the wp-config.php file.

Step 1. Access wp-config.php file via FTP or File Manager.



Step 2. Edit the file.


Step 3. Locate the following line:

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


Step 4. Add the following script:
define('DISABLE_WP_CRON', 'true');


Step 5. Save the changes.

Setup cron job for wp-cron.php manually

Step 1. Access cronjob through cPanel or SSH.

Step 2. For cPanel, click the drop-down menu for Common Settings and select once per hour.

Step 3. Enter the following command in the Command field:
cd /home/cpanelusername/public_html; php -q wp-cron.php
(Make sure to replace cpanelusername with your actual username for the path and add your WordPress folder if necessary after the public_html folder.)


Step 4. Click Add New Cron Job button.

Step 5. The cron job is now added in your cPanel.cron-job-added

If you have further questions, please do not hesitate to contact our support team.

Disable wp-cron.php

(Visited 238 times, 1 visits today)