How to Use Crontab With WordPress

If you want to use crontab Linux command with WordPress, you should first read this great explanation of crontab by Kevin van Zonneveld. Seriously, this is probably the simplest guide ever.

Now that you read it, you want to use it for WordPress. You don’t want to store output so you are trashing it, and you are calling WordPress pseudo cron functionality, located in /wp-cron.php file. We use curl for this.

* * * * * curl http://example.com/wp-cron.php > /dev/null 2>&1

Just replace example.com with your actual domain. In this example we use crontab every minute, but you can follow this guide for setting any value.

Don’t forget to save new settings when you are done!

2 thoughts on “How to Use Crontab With WordPress


    1. I haven’t tested that, but quick web search suggests that you need to run it for every domain, which is how I suspected to be because there can be many sites in multisite and too much to process during a single request.

Leave a Reply to Ryan Hellyer Cancel reply

Comment Guidelines:
  • Your email address will not be published
  • Fields marked with * are required
  • If you want your picture next to comment, open an account at Gravatar
  • If you want to know if someone replied to your comment, check “Notify me of followup comments via e-mail”
  • You can use these HTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>