Setting up a Regular Run of wp-cron.php
The wp-cron.php file is a virtual cron job (or scheduled task) WordPress uses to automate certain operations, for example, checking for plugins or themes updates, sending email notifications, and so on. By default, WordPress runs the wp-cron.php task every time someone visits your website. If you want WordPress operations to be performed regularly and on schedule, you need to disable the default wp-cron.php execution. If your website has high traffic, scheduled wp-cron.php execution may also improve the website load time.
To disable wp-cron.php on a particular WordPress installation:
- Go to WordPress and choose the WordPress installation for which you want to disable the default wp-cron.php execution.
- Turn on “Disable wp-cron.php” on the installation card. The default wp-cron.php execution is now disabled. Instead, WordPress Toolkit has automatically created a scheduled task, which will now run wp-cron.php every 30 minutes.
- (Optional) You may want to run wp-cron.php on a different schedule. To do so, click the icon. This will open a new Sandbox.page tab with scheduled tasks. Change the default 30-minute interval, and then save changes.
You can also disable wp-cron.php on all new WordPress installations. To do so, go to WordPress, click “Settings”, and then select the “Disable wp-cron.php on all new WordPress installations” checkbox.
Prior wp-cron.php Configurations
You may have already disabled wp-cron.php without WordPress Toolkit by using the following ways:
- Editing the wp-config.php file. In this case, WordPress Toolkit will detect this change and adjust the “Disable wp-cron.php” toggle.
- Creating a scheduled task. In this case, WordPress Toolkit will create another one once you disable wp-cron.php in the WordPress Toolkit interface. You can either keep two tasks (it will not much affect the performance) or delete your task and keep the task created by WordPress Toolkit.