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.

July 28, 2009

WordPress 2.8 Media Upload Issue

Gotta love that WordPress. It seems like instead of doing a real, thorough QA, they rely on us to bitch and wine when shit doesn’t work until a.) one of us figures it out, or b.) we complain enough until they figure it out.

Then again, at least it’s a pure open source solution, unlike those greedy bastards at Varien who decided Magento was worth more than the price of a growing community.

But again, I digress.

So, are you among the dozens in this post that can’t upload their images after installing the new WordPress v 2.8?

Me to. At least I was until I figured out a small solution. I commented on the above post with the information below.

In the wordpress admin, go to “settings,” then “miscellaneous.”

The first input field should be for the directory to which you store your images… for me it was the absolute path to my wp-content/uploads directory so it looked sort of like this

/a/lot/of/directories/until/blog/wp-content/uploads

And that was the error… simply replace whatever is in those fields to

wp-content/uploads

Notice there is no backslash at the beggining! As long as you’re storing your files in the same directory as any normal wordpress user, this ought to work. Basically the trick is to not use the absolute path to the folder and just use whatever folder is under the main wordpress directory.

Make sense?

If this hack manages to work for you, let others know! Or, if it didn’t, let me know so I don’t feel so good about myself (this can be accomplished with numerous other approaches as well).

19 responses

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