WP Cron is a WordPress function which runs unattended scheduled tasks. To enable WP Cron, go to the directory where your wp-config.php is and and add:
anywhere above the /* That's all, stop editing! Happy blogging. */
If you need to disable WP Cron for any reason, just set "DISABLE_WP_CRON" to true as shown below:
WP cron runs when a visitor comes to your site. If you did not have a visitor in the last hour, the tasks scheduled with WP Cron never kicks off. We recommend using operating system based cron or external ping service if you do not have an active site or if you own a server with many WordPress websites hosted.
To be able run WP Cron externally, follow the steps below:
- Disable WP Cron.
- Create a operating system based Cron Job. For example, the following runs every 5 minutes in a linux based system.
*/5 * * * curl --silent "https://example.com/wp-cron.php?" > /dev/null 2>&1
- Test to make sure everything works as expected