WordPress wp-cron not working?

There are various reasons why wp-cron does not work, one of the most common ones being a misconfigured network or firewall.

However, due to the way wp-cron works, anything that prevents WordPress opening a http connection to itself will cause wp-cron to fail. In my case I had a .htaccess password set on the development site to prevent crawlers from indexing it.

A quick test to see if WordPress will be able to access wp-cron.php is to use wget from the command line of your server:

wget http://www.example.com/

If this fails you will at least have a clue as to why it failed. It would be great if WordPress could log the failure rather than remaining silent (even with WP_DEBUG enabled). This was discussed in http://core.trac.wordpress.org/ticket/11831.

Tagged with: , , ,
Posted in Command Line Tricks, Development, Tech Blog, Web, Web Sites

Leave a Reply

Your email address will not be published.