How to set up external Cron for siteWordPress

Settings are made both on the site and on the hosting.

Site setup

In the site’s configuration file “wp-config.php” it is needed to add directive define( 'DISABLE_WP_CRON', true );.

For example:

<?php
define( 'DISABLE_WP_CRON', true );
define( 'WP_CACHE', true );
.
/**
* The base configuration for WordPress
*
...

Hosting setup

On the hosting, in the task schedule settings, add a periodic (for example, once a minute) call to the site page https://<yoursite>/wp-cron.php should be added.

For example, here’s what the task schedule settings look like on Fornex hosting. It is needed to create a task to execute wget -O - -q -t 1 https://<yoursite>/wp-cron.php.

Note. In the case of WordPress in multi-site mode, it is enough to create a task for the main site only.

Leave a Reply