September 16, 2009

WordPress Posts Missing Schedule

So recently a client had me upgrade their copy of WordPress from 2.6.something to the latest 2.8.4. Things went fine; themes and plugins didn’t need updating, but the next day I got an email complaning about how the posts weren’t publishing at the times they were set to, and were returning a status in the admin as “missed schedule.”

It took me a LONG time to figure this one out. And I didn’t really figure shit out, but finally found the appropo hack at this forum. Just reposting what you gotta do to get this working; for some reason it’s not posted everywhere. There are some other ways of correcting what’s going on; but if you don’t have root access to your hosting server like I don’t, you gotta figure out a way to make it work with just code. Here’s a line that’ll do it for you; place it in your wp-config.php file.

  1.  
  2. //added for cron posts
  3. define(‘ALTERNATE_WP_CRON’, true);
  4.  

- Taken from Otto32′s comment on the wordpress forum, check it out for a great explanation or read my shittier one below:

Basically, there’s a file called wp-cron.php that’s called everytime wordpress loads, and runs anything that’s scheduled; from the future planning of posts to some plugins that use the schedule feature. Every time someone hits your blog, if it’s been a long enough time since it’s last run, wordpress sends a request to wp-cron.php.

If the posts aren’t publishing, it may be the way your server is reacting to an HTTP request from itself. So you ahve to use a different type of request, by putting the above code into your wp-config.php. There are ways to alter your server to accept requests from itself; but for my client, I didn’t have root access, and only could edit the wordpress code itself. So this fix is certainly better than others.

Let me know if it helped.

RSS feed for comments on this post.

  1. Zachary Pontious — July 8, 2010 @ 10:16 pm

    omg! i have no clue.. will some 1 show me how 2 get this page saved in my ipod so i can show my little sister?

Leave a comment

Best of Blog

  1. Let’s do the kids a favor: HTML as a classroom language
  2. USTORE.js – cross browser local and session storage
  3. Add Facebook Connect to your PHP Web App
  4. Setting up your website on Rackspace Cloud Servers – Manage Your Own Hosting
  5. Tutorial: Using Zend_Captcha_Image

Search if you must