Use a real cron job instead of WP-cron

STEP #1 – disable WP-cron from your wp-config.php file

  • Open up wp-config.php
  • Add define( 'DISABLE_WP_CRON', true); anywhere above the line that says, “That’s all, stop editing! Happy blogging.”

STEP #2 – create a cron job from your webhosting control panel

  • Log into your webhosting control panel (cPanel, etc) and find the Cron Jobs function.
  • Add this line and set it to 5 min intervals or higher (if you want to be nice to JVPS servers) wget -q -O - https://domain.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1 (change the domain to yours)

NOTES:

  • Some guides out use the server directory path (/home/user/public_html/wp-cron.php?doing_wp_cron) instead of the URL. I prefer the domain version as it’s easier to understand and safer (since actual server directory might be different). I think the only benefit to the server path version is that it’s slightly less server work due not having DNS lookups and SSL handshake but it’s not noticeable at all.
  • You can use WP Crontrol plugin to manage your cron jobs if you feel they’re backed up or stuck. It’s sometimes an issue for bloated sites. If your cron jobs haven’t run for a while, your site may seem slow or crashed while it catches up. Just wait 5-10 minutes and it should work again.
  • Multi-sites only have to set the cron job for the main site domain. You don’t have to set for each site in there.

Looking for ultra-fast WordPress hosting?

Learn More About JVPS

Reader Interactions

Leave a Reply

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