Disabling default WordPress cron

WP-Cron is an internal WordPress function that allows you to create your own task schedules. It allows us to run a saved task that, for example, has been added by us, a plug-in or one of the default WP tasks (e.g. checking if updates are available).

By default, WP-Cron is launched every time you enter a page. Thus, in certain situations, it can cause a noticeable increase in page loading time. Such a situation can occur most often as a result of wrong plug-in adding tasks. In this case it is worth checking if disabling the default cron of WordPress will help.

How to turn off the WP-Cron?

1. Log in to Your cPanel account.

2. In the Files section, select "Files Manager". (alternatively, the file can be accessed using an FTP account).

Disabling WP-Cron - step 1

3. Go to the Wordpress folder and paste at the end of the wp-config.php file: define('DISABLE_WP_CRON', 'true');

Disabling WP-Cron - step 2

4. Save the file to make changes.

Can I use the WP-Cron in any other way?

Yes. If WP-Cron had to be disabled in WordPress and you need it, there is nothing to prevent you from adding it to the cron tasks on the hosting.

Just take a look at the How to add cron job? tutorial, and with that help, add a command /usr/bin/curl "https://<YOUR-DOMAIN>/wp-cron.php >/dev/null 2>&1

wordpress, cron, wp-cron


Also Read