How to Disable WP-Cron and Set Up High-Performance cPanel System Cron

50 views
Short answer: Add define('DISABLE_WP_CRON', true); to wp-config.php, then configure a real Linux cron job in cPanel Cron Jobs executing wp-cron.php every 30 minutes.

Accelerate WordPress page load speeds and eliminate server lag spikes by replacing default page-load WP-Cron with a reliable cPanel background cron job.

Before you start: Back up your site files and database and download the backup to your own computer. How to take a full backup

Quick reference

Config Directive define('DISABLE_WP_CRON', true); in wp-config.php
cPanel Command /usr/local/bin/php -q /home/USER/public_html/wp-cron.php >/dev/null 2>&1
Optimal Frequency Every 15 minutes (*/15 * * * *)

Steps

  1. Why Replace WP-Cron? By default, WordPress checks for scheduled tasks every single time a visitor loads a page. On high-traffic sites, this exhausts CloudLinux Entry Processes and CPU. On low-traffic sites, scheduled posts miss their publication windows.
  2. Disable Default WP-Cron in wp-config.php:
    • Open public_html/wp-config.php in cPanel File Manager.
    • Add this line just above /* That's all, stop editing! Happy publishing. */:
      define('DISABLE_WP_CRON', true);
    • Click Save Changes.
  3. Create the Background Cron Job in cPanel:
    • Go to cPanel > Advanced > Cron Jobs.
    • Under Add New Cron Job, set Common Settings to Once every 15 minutes (or */15 * * * *).
    • In the Command field, enter:
      /usr/local/bin/php -q /home/YOUR_CPANEL_USER/public_html/wp-cron.php >/dev/null 2>&1
    • Click Add New Cron Job.

Disable WordPress WP-Cron Directive via CLI

# Add the disable setting to the config file with WP-CLI
wp config set DISABLE_WP_CRON true --raw --path=/home/USER/public_html

Troubleshooting and tips

  • Missed Scheduled Posts: If scheduled posts still show as "Missed Schedule", check that the path to wp-cron.php has your correct cPanel username substituted.
Need more help? If you run into an error while following these steps, open a ticket with technical support and our team will look into it. Open a ticket
Was this article helpful?
No, I need more help
Didn't find your answer?
Under 3 minutes
Submit Support Ticket