Results Driven Internet Marketing For Industrial and B2B Firms
407-902-5414
17

WordPress 3.1 Problem Permalink 404 errors

WordPress 3.1 Problem Permalink 404 errors

Upgrade At Your Own Risk

In my opinion, anyone who uses custom permalink structure on their blog should definitely hold off from updating to WordPress 3.1. Like many other people who use custom permalinks, I found that once I updated to 3.1, EVERY one of my blog posts threw off a 404 error, so basically the entire blog was down.

Not a good situation.

Anyone who has recently upgraded to WordPress 3.1 and has a permalink structure could find themselves in the same situation with EVERY post suddenly coming up with a 404 error. Well, I tell you the stress of finding yourself in that situation is not fun. I did what everyone else probably would do, searched the internet for a solution. Well, it’s happened to many people and I’m sorry to say that I found many potential fixes for the problem that simply did not work for me. The problem, they said, was with plug-ins or the .htaccess file. After many hours of trying both these fixes, I found that none of them worked. The only thing that worked was to change the permalink settings to the default setting. This brought the blog posts back, but of course was an unacceptable solution for me or anyone who is interested in SEO, as their posts will all get those ugly numerical URLs.

After many hours of frustration, I read that there is a database upgrade with WordPress 3.1 and I believe that it  is something in this upgrade that is causing problems with anyone using a custom permalink that doesn’t include the %category% tag. So my old Permalinks, which were set to %year%/%postname%, I changed to %category%/%year%/%postname% and voila, the problem was solved. Now if you wonder why I had the %year% variable in the URL in there was because there have always been issues with WordPress permalink structures that don’t have a number in them, so adding the year solved that problem. I personally don’t know if that problem has been solved with WordPress 3.1, but I believe that there is something in the permalink structure of the new WordPress edition that requires the %category% in the custom permalink. Or maybe WordPress simply didn’t count on the fact that someone might use a permalink setting other than /%category%/%postname/.

Either way, if you have a custom permalink structure, upgrade at your own risk. Or better, wait for a solution which I guess will have to come, considering how many people use a custom permalink structure.

So if your blog is entirely down once you upload, this is a fix that will work without having to go to the awful default permalink ID. One last thing to remember: if you have upgraded and need to change your permalink structure, all your old links will now come up with 404 errors. So make sure you use a plug in like redirection to make sure they are all updated automatically.

0

Comments 17

  1. I am having a similar problem after upgrading to 3.1. I like to have my Permalink setting on the “Day and Name” option, and the links to my posts and pages work fine. The 404 pops up when I click on the link for any tag or category. If I set Permalinks to “Default”, the 404 no longer activates, but the relevant page always says “No Posts Found”, which, of course, doesn’t make any sense since I just clicked on a tag or category listed for an existing post.

    I tried your %category% trick to no avail. 🙁 I’ve also deactivated all of my plugins with no change in behavior, so it’s looking more and more like the WP devs missed something critical. Luckily for me, my blog is pretty new and my readership is teeny-tiny.

  2. @Mark Almighty

    That’s sad to hear. Yes, it looks as though WordPress has a major problem here, because Tags were the only thing that worked for me after I upgraded. Categories and Posts did not. A good reason to delay upgrading until it has been worked out or a universal solution is found. Just want to remind everyone after they upgrade to check their blog posts, category and tag pages. Because one thing I’ve seen for everyone is that the static pages still work fine so if you have a static home page, you won’t even know that there is a problem if you don’t look closely.

  3. I too have searched google and attempted ALL of the
    ” fixes ” found therein, all to no avail. While yes, my blog appears to have disaffected by the WP 3.1 update, every single post and page redirects to the home page, even if I use ” default ” permalink structure and no matter how many times I regenerate the .htaccess file, no matter the order of the process in regenerating permalinks and .htaccess, having every single plugin deactivated, and not even having any of the supposed ” affected ” plugins ever installed. This is a horrible update. I sincerely hope WP does a better job next time. The only think I can think of do to is to attempt a completely new fresh install, without importing the old database, creating a brand new database and recreating all the posts and pages manually. Even your fix did not work me, but I am very happy it has worked for you. My blog is ( was lol )
    at top of google when searching, guess I have to start all over again. Bad WordPress, Bad bad bad.

  4. I don’t see how a database upgrade could create this issue, but it has certainly had an adverse affect on hundreds of blogs.

    My solution that worked for me and some others was to write a hotfix that circumvents the 3.1 canonical redirect. But, some folks are having issues other than just category/tag 404’s (top menus and dropdown menus). My solution worked on every site I’ve tried (including multi-sites) WITHOUT having to tinker with .htaccess, change the existing permalink structure, or disable any installed plugins. But, it doesn’t work on some sites.

    Moreover, just disabling the canonical redirect fixes the pblm on some installations. But, if this doesn’t solve it for you … or you’re still searching for a solution, here’s a more extensive alternative hotfix link. Just put the code in your theme’s functions.php file.

    I’d also recommend that you undo any prior attempt fixes, disable only plugins that change category or tag url’s, and make sure your .htaccess is correct. At the following link, in addition to the hotfix “action” are both the standard single-site and multi-site .htaccess file code.

    http://wpcodesnippets.info/blog/how-to-fix-the-wp-3-1-custom-permalinks-bug.html

    Also, this hotfix is version-stamped in the full expectation that the next WP upgrade will fix this ubiquitous challenge.

  5. I was facing Same problem and My site going Down in Google Ranking when i copy your Mention Code and paste into my permalinks i stood up and clap and say thank you man I am So Glad to See back my catogary posts
    thank you again.

  6. This is the first post I’ve seen that really sums up this problem. It’s amazing that 3.1 has been out as long as it has and this has not been solved. I took a chance and upgraded to 3.13 as I had tried when 3.1 came out and had the same errors I did the first time I upgraded. After trolling around google, I tried the .hta access fix (didn’t work), tried default permalinks – worked but not an option. The other more friendly url options did work for posts but not for categories. I was considering trying Luke America’s fix (thanks for suggesting this to the community) but decided in the end that 3.1 was just not that important to me.

    Alas, in the end, I called Bluehost, and had them restore my blog back to the last update (midnight last night), which is what I had done the last time. Thankfully, this option was suggested to me when I called them.

    In all the time I’ve been on wordpress, I’ve always simply just updated/upgraded to the latest version automatically – without even thinking about it. I’d never had any problem until 3.1. My custom permalinks have always been set to /%category%/%postname%/ and I’ve never had a problem. I just read this on WP http://screencast.com/t/mmUnB6PJd but it’s never given me performance issues. Question, if I change my custom url at this point to put /%year%/%monthnum%/ ahead of category and post name, how quickly would google reindex?

  7. Jeremy Broekman

    was having the same problem as of the lastest upgrade. not sure that this did the job… but I went to my permalinks and revised the structure from
    “/%postname%” to adding the “/” closing out the link
    /%postname%/ and now it works. Fluke or does this work for you as well!?!?!? 🙂

  8. Does anyone know if 3.1.3 has resolved this? Thank you

  9. I had this problem with WP 3.1.3. Updated to 3.2, but the issue was not fixed. After hours of searching & trying different combinations, I was able to fix this. The common suggestions on the WP forum are to change your Permalink settings (Settings > Permalink) to Default and then back to the “pretty Permalink”, i.e. %year%/%monthnum%/%day%/%postname%/ This did not work (even after editing my .htacess file).
    However, after I modified the optional permalink settings for category & tags (entered any text there), this started working.
    Hope this works for you.

  10. @Ramesh Vishveshwar

    Thank you Ramesh. I’ve found in different blogs that changing the permalink setting to default then back sometimes does work. I didn’t know there was an option for separate permalink category and tags. Makes sense that this would work since this was mostly the problem for me. Thanks again for the advice

  11. Thought I would let you know that the category & tags solution is not completely fool-proof. I noticed that I have to play with the permalink option for categories & tags everytime I add a new post. New tags always ended up with 404, but after changing the settings, they appear fine.
    I am planning to raise this with the WP folks, but I need to try this out first with the default Theme & see if it is a problem with my theme.

  12. near cried this morning when my site when down due to server changes etc, but after reading your post it got fixed straight away

    honestly if you were close to me I would have given you the biggest hug

    http://www.shadders.net

    Now my images are not uploading looking forward to fixing that asap

    cheers for this post

  13. I had experience about permalink problem with my 5 sites just recently. I don’t know but first thing is the hosting itself might do something about permalinks because there trying to kill your websites. Second, as I try to go to setting and permalinks, (this is the time I have a error404) when I look at my permalink from /%category%/%postname%/ then I just remove the slash at the end of custom permalink /%category%/%postname% then all pages was online without any page404. That is why I have a hunch that someone has put an slash on my permalink. Which i think my hosting company can maneuver my permalink.

  14. so far I have not solved my problem with permanlink just want to know which characters should I enter custom structure

  15. @jose

    I would try /%category%/%year%/%postname%/ or if that doesn’t work, change to the default structure which usually solves the problems but leaves you with un-optimized URLs. Remember that if you change the structure of the permalinks, you should set up redirections to the new pages from the old. A plugin like Redirection installed before changing the structure can take care of that.

  16. Thank you for this post. You just saved me hours of troubleshooting!

  17. I’m using WP 3.4.1 now, and running a network set-up. I had no problems with this at all across any of my sites until I opened up a new blog on it last night, and all my category and tag links gave me a 404 error. I implemented your fix, adding %category% into the permalink structure and it all works fine now. Just odd that only one of the blogs was affected. Thanks for this fix.

Comments are now closed.