If you’re managing your WordPress site on Ecenica WordPress Hosting and want better control over scheduled tasks, we recommend disabling the default WordPress cron system (wp-cron.php). This can help improve performance, especially on busy WooCommerce sites and reduce your resource usage.
What is WordPress Cron?
WordPress uses a file called wp-cron.php to simulate cron jobs (scheduled tasks) like:
- Publishing scheduled posts
- Checking for updates
- Running plugin tasks (like backups, WooCommerce cleanups)
Why disable WordPress Cron?
- Peformance
- Reliability
- Greater control
By default, wp-cron.php runs every time someone visits your website. On high-traffic sites, this can lead to performance issues. Disabling it allows you to use real server-level cron jobs instead which let you decide what time cron jobs are run, reducing resource usage.
Method 1: Disable WordPress Cron in WordPress Manager
- Log in to your Ecenica Dashboard
- Click Manage next your Ecenica hosting service.
- Click WordPress Manager
- Locate the existing staging website and click the arrow to expand the options.
- Disable **WordPress Cron (wp-cron.php)**
WordPress cron will be disabled and a cron job will be added instead which will be run twice an hour.
Method 2: Disable WordPress Cron and create a Cron Job manually
If you prefer to manually disable WordPress cron and create a cron job follow these steps:
- Start by disabling WP Cron from running each time someone visits your site. To do this, open your wp-config.php file in your main WordPress folder and add the below code at the end;
define('DISABLE_WP_CRON', true);
- Log in to cPanel.
- In the Advanced section, click Cron jobs.
- Locate Add New Cron Job. The cPanel Cron jobs tool has a number of common schedules preset. To execute the command every every 30 mins, select Twice an hour from the Setting drop down. Ecenica recommends that you do not set the interval lower than 15 minutes.
- Add the following command. Replace https://www.example.com with your site’s domain;
wget -q -O - https://example.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1
- Click Add New Cron Job to set the cron.
Debugging WordPress cron
There are several plugins available to help you debug and see what your WordPress cron system is doing. We recommend the following”