How can I disable the WordPress Cron job?
WordPress installations often require periodic tasks, which by default are executed via the wp-cron.php script triggered with each page request. While this method works, it has drawbacks, especially for busy sites.
On larger websites, frequent calls to wp-cron.php can lead to excessive resource consumption. For example, if a site receives 100 visitors an hour and each visits three pages, wp-cron.php could be executed 300 times an hour, potentially consuming over 200 MB of virtual memory per instance. This can exhaust your cPanel account’s memory or CPU allocation, causing performance issues.
Conversely, if your site is well optimized and serves most requests from cache, wp-cron.php may not run as often as needed, resulting in missed scheduled tasks.
To avoid these problems, configure WordPress to disable wp-cron.php from executing on page loads and set it up as a real cron job that runs periodically.
You can easily set this up using the WordPress Manager in Softaculous:
Log in to your cPanel account.
Navigate to WordPress Manager by Softaculous.
Locate your WordPress installation in the list.
On the next screen, set WordPress Cron to Disabled.
This will prevent the cron from running during page execution and create a cron job in cPanel to execute the WordPress cron twice per hour.
By implementing this change, you can improve the performance of your WordPress site, ensuring that background tasks run smoothly without impacting user experience.
If you have any questions or need assistance, please contact our support team.
On larger websites, frequent calls to wp-cron.php can lead to excessive resource consumption. For example, if a site receives 100 visitors an hour and each visits three pages, wp-cron.php could be executed 300 times an hour, potentially consuming over 200 MB of virtual memory per instance. This can exhaust your cPanel account’s memory or CPU allocation, causing performance issues.
Conversely, if your site is well optimized and serves most requests from cache, wp-cron.php may not run as often as needed, resulting in missed scheduled tasks.
To avoid these problems, configure WordPress to disable wp-cron.php from executing on page loads and set it up as a real cron job that runs periodically.
Setting Up the Cron Job
You can easily set this up using the WordPress Manager in Softaculous:
Log in to your cPanel account.
Navigate to WordPress Manager by Softaculous.
Locate your WordPress installation in the list.
On the next screen, set WordPress Cron to Disabled.
This will prevent the cron from running during page execution and create a cron job in cPanel to execute the WordPress cron twice per hour.
By implementing this change, you can improve the performance of your WordPress site, ensuring that background tasks run smoothly without impacting user experience.
If you have any questions or need assistance, please contact our support team.
Updated on: 18/10/2024
Thank you!