WordPress 2.6 Upgrade and 404 Error

I love it when I log into my WordPress admin area and it tells me that  a new WordPress is available. I love upgrades. Yes, really.  On this occasion, however, I lost the battle when I came face to face with the WordPress 2.6 Upgrade and a 404 Error.

First it’s very important to note that in WordPress’s 3 Step Upgrade Guide, there is in fact a Step 0. Step 0 reminds you, and wisely so, to back-up your WordPress install, because as good as the WordPress community is, they are all still human.  So if a bug in the code sneaks in or you’re trying to cyber while you upgrade and not paying attention, then a back-up is a very handy fall-back for if your site falls down.

Moving on – last night I downloaded the new WordPress 2.6 with trembling hands, anticipating the new features, the improved speed and that new software smell.  I followed the instructions for the upgrade (backup, delete & upload, click upgrade) and after I did something nice for myself, when I logged back into 1earthadventures, everything seemed fine.

But then I noticed in my Feedjit that somebody had landed on a 404 error page, which shouldn’t happen.  As I clicked on a single post, before it even loaded, the title turned to “Oops!” that signified the serving of a 404 error page.  Turns out that all my single posts under WordPress 2.6 were inaccessible and got a 404 error page instead.

As my main page worked, the obvious error was with the URIs and at first I thought perhaps my fancy URIs were turned off by mistake.  Checking the settings in the admin area, this was proven to be false.  I checked my .htaccess file just to make sure none of the conditions in there where accidentally erased, but that too was untouched.

Next I turned to Google and said a prayer, which was answered in the form of several WordPress forum posts.  But alas, the WordPress 2.6 upgrade had only been release a few hours prior and the only help the forums proved to be was to show me that I wasn’t the only one having this 404 error problem.

A moment ago I searched for this again and stumbled across this bug report, which outlines the problem.  In essense, for those of us who use index.php in the URI, this problem will persist until they fix it, or until you fiddle with your code and temporarily fix it yourself (read that bug report for what to do).

The problem has been escalated and is now considered critical and is destined for WordPress 2.6.1. Obviously it will affect a lot of bloggers, so lets hope everybody backs up first. But it should, as far as I understand it, only affect those of us who use index.php in our URIs.

In the meantime, I’ll figure out to get rid of index.php in my URI without screwing up all my links in the search engines.  In one of the posts the moderator said that if you’re hosted on Unix/Linux, then you really shouldn’t need to index.php in the URI – as that work-around came about for the benefit of those hosted on Windows IIS.

I’ll explore that and hopefully I can beat the WordPress 2.6 Upgrade and 404 Error dilema before the 2.6.1. fix.

Update 080717 – WordPress 2.6 404 Error Fix/Solution

Thanks to the feedback from amy-wong.com and Kerry Webster, I’ve solved my 404 Error issues.  First I went into my WordPress settings and in the custom URI I simply removed “index.php” from the string.

I can’t remember why I chose to have index.php in the first place, but I didn’t want to remove it because I thought my links from other websites and in search engines wouldn’t work.  But as Amy Wong confirmed, the links still work as they simply direct themselves to the new URI sans index.php.  I tried this in my 2.5 install first to test it, before I upgraded – because that pesky “index.php” is what broke my 2.6 install.

Oh, the trick above apparently is guaranteed to work if your site is hosted on an Apache server (on Linux), but if you’re hosted on Microsoft’s IIS you might have problems – as index.php was left in there for the poor people on IIS.  Kerry Webster created this work around, but Kerry, I suspect, is a server admin, so you might not have the access required for this stunt and I’m not entirely sure your host will be keen to try it.

Anyway, after that, I once again installed WordPress 2.6 and *tada*, it worked like it should. No more 404 Errors.  So yay! for upgrades! Yes, it bombed at first, but the upside is not only do I have a fresh release of WordPress, but also much tidier URIs.

Rock on, WordPress!

3 Comments

  • Amy

    17 July 2008 at 07:47

    Actually, I just checked some of the pages that I know rank on Google, and they already show up without the index.php thing in them. Yah, I know… surprising, didn’t expect it to be this quick. Also, redirecting seems to work in older links that include the index.php bit.

    The only thing working weird for me is my WP Stats, showing just the post #, but no link to it. I also think I've lost my previous data.

  • pre

    17 July 2008 at 12:59

    Oh, nice.

    Three times I 'upgraded' and said "what the fuck? How'd I screw that up", restored and tried again.

    How are they still pushing 2.6 without a warning on this man?

    Thankfully (sort of), when I got bleedin' hacked the other month coz of not upgrading fast enough I started a proper backup policy.

    Grr.

    I guess sometimes up upgrade too slow, and sometimes you upgrade too fast.

  • 1Earth

    17 July 2008 at 16:29

    Thanks for the feedback Amy, maybe I'll change my URIs in 2.5 first to work without index.php and see what gives and then upgrade.

    Pre, can't blame the WordPress team too much, they do great work. This bug obviously only affects some people (and not most), otherwise it never would have been released.

    The diligence of the WordPress community is shining strong. If you follow the bug report above, you can see it's getting urgent attention.

Post a Comment