How to Disable wp-cron and Use Real Cron Jobs
Ahsan Parwez
HostWP Expert
To disable wp-cron, add define(‘DISABLE_WP_CRON’, true); to your wp-config.php file. Then, set up a real server cron job via your hosting control panel (like cPanel) to trigger wp-cron.php at regular intervals, such as every 15 minutes.
Detailed Answer
- Replacing the default wp-cron with a real server cron job improves site performance and ensures scheduled tasks run exactly on time, regardless of your website’s traffic. Here is how to do it:
- Step 1: Disable default wp-cron: Access your site’s files via FTP or File Manager, open the wp-config.php file, and add define(‘DISABLE_WP_CRON’, true); just before the line that says “That’s all, stop editing!”.
- Step 2: Set up a real server cron job: Log into your hosting control panel (e.g., cPanel), navigate to the “Cron Jobs” section, and set the execution time (e.g., every 15 minutes).
- Step 3: Add the command: Use a command like wget -q -O – https://yourdomain.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1 or the direct PHP path to trigger the tasks.
- Why this matters: It prevents resource spikes on high-traffic sites and guarantees that scheduled posts, backups, and updates run reliably on low-traffic sites.
Honestly, leaving the default wp-cron on is like having a security guard check your ID every single time you walk into your own house. It just slows things down unnecessarily. Switching to a real server cron job is the smart, pro move. But hey, if you don’t want to mess with config files or cPanel settings, don’t sweat it. We handle all that server-level cron setup for you automatically at HostWP.io. You just focus on your content, and we’ll make sure your background tasks run like absolute clockwork.
Our WordPress expert are here to help you 24/7.
On this page
Related Questions
Expert WordPress Support Engineers Available 24/7
90 sec
Average
Response Time
98 %
Customer
Rating
24/7
Expert
Support

