How to disable WP-Cron and create a server cron

Some high-traffic websites slow down due to excessive WP-Cron executions. Yes, these are rare cases, but it can happen. To prevent this from happening to you, in this guide, you will learn how to disable WP-Cron and create a server cron. It only takes two steps, and we are sure you can do it. But first, let’s see what WP-Cron is.

What is WP-Cron and how to disable it?

WP-Cron is a system natively integrated into WordPress that simulates the cron service of a Linux server, a process that runs tasks at specific intervals.

Several functions are automated in WordPress by default. For example, receiving an email every time someone leaves a comment on a blog post or publishing scheduled articles. These automated functions are executed through the WP-Cron function, which is built into WordPress and runs from the wp-cron.php file.

On page load, WordPress checks whether any scheduled events are due. If so -and if no run has started in the last 60 seconds (time that you can edit with the constant WP_CRON_LOCK_TIMEOUT)- it makes a non‑blocking internal request to wp-cron.php to process them. Otherwise, nothing runs. This behavior can still impact performance on busy sites because checks still happen on every visit.

To prevent this function from dragging down your site’s performance, you can disable WP-Cron in WordPress and use a real server cron job so that scheduled tasks don’t depend on site visits. Let’s see how to do it.

How to disable WP-Cron step by step

To disable WP-Cron, you only need to do two things:

  1. Open the wp-config.php file and add the following line of code: define( 'DISABLE_WP_CRON', true ); Make sure to add it just above the line that says: /* That's all, stop editing! Happy publishing. */ Save the changes.
  2. Create a Cron Job from your hosting control panel (such as cPanel) and add this line of code: wget -q -O - https://www.yourdomain.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1 Replace yourdomain.com with your actual domain.

And that’s it! It won’t take more than a couple of minutes.

Important notes to keep in mind

  • Some servers have limits that force you to use longer intervals, sometimes over 30 minutes. If that’s your case, set the lowest interval you can. If there are no restrictions, 5 or 10 minutes is enough—unless you have a site that needs scheduled tasks to run almost immediately, like a news website. In that case, set it to 1 minute.
  • If you need shorter intervals, you might consider using your own server or a third-party cron service, such as EasyCron or Cloudflare workers.
  • Instead of calling a URL, you may run cron without HTTP using PHP CLI: /usr/bin/php -q "/var/www/html/wp-cron.php" >/dev/null 2>&1. Technically, this reduces the server’s workload, because the server executes wp-cron.php directly instead of calling an external domain. Pay attention to the paths, because most probably your website is using different ones.
  • Alternatively, use WP-CLI: wp cron event run --due-now.
  • On multisite, cron events are registered per site. To run due events network‑wide, iterate over sites with WP‑CLI (for example: wp site list --field=url | xargs -I % wp cron event run --due-now --url=%), or create per‑site cron entries.

Why is it a bad idea not to disable WP-Cron?

Ignoring this issue can cause two major problems:

  • If your site has a lot of traffic -over 100,000 daily visits- it could significantly slow down your server’s performance. Do the math: that’s an average of 1-2 visits per second, meaning WP-Cron checks run once or twice per second, not counting bots or search engine crawlers.
  • If your site has very little traffic, scheduled tasks might not run at all. In other words, if no one logs into wp-admin and no one visits your site, essential tasks like backups may not be executed. These tasks will pile up and eventually run all at once, but very slowly.

For this reason, disabling WP-Cron is important for both high-traffic sites (highly recommended) and low-traffic sites (recommended). Replacing it with a real server cron ensures wp-cron.php is triggered at defined intervals. Ultimately, this is a scalable solution, and the sooner you implement it, the better.

By disabling WP-Cron, you’ll improve your site’s performance, making it faster and more reliable. If you have a few minutes, give it a try!

Do you have any questions? If you need help or WordPress technical support, feel free to reach out.

Leave a Reply

Your email address will not be published. Required fields are marked *