404 Errors on Permalinks After WordPress 3.1 Upgrade

Yesterday I went through the trouble of upgrading to WordPress 3.1 and experienced a couple of issues that I wanted to report about. Specifically, the categories and tags permalinks were not working, giving a 404 error right after the upgrade. First, I thought that it was a bug in WordPress 3.1, but then I started investing the issue a little more and found out what the actual problem was. The second problem came up with my wordpress multisite (old WPMU) configuration – the /blog slug came back again and I had to deal with that issue separately as well. Gladly, I was able to find a fix for both of these issues and WordPress 3.1 is running very smoothly now. If you have a similar problem after upgrading to WordPress 3.1, follow along.

The problem with the permalink structure getting messed up is related to several plugins. The plugins that generate problems with WordPress are some of the most popular WordPress plugins and I hope the authors will come up with a fix soon. Meanwhile, you will have to disable them. Here is the list of plugins that break permalinks on WordPress 3.1:

If you have any of the above plugins, here is what you need to do:

  1. Disable the above plugins
  2. Within the admin area in WordPress Go to Settings->Permalinks
  3. Copy your “Custom Structure” that you are using by selecting it and pressing CTRL+C
  4. Change your permalinks to “Default” and Save
  5. Change permalinks back to “Custom Structure” and copy-paste (CTRL+V) the permalink structure you were using before

The above will fix the problem with categories and tags not working – the permalink structure will be regenerated and life will be good ;-)

If you have a WordPress Multisite installation like me and you do not want to have the “/blog” slug for the first WordPress site, then after the above steps are done, you have to download and install the “Remove /blog slug plugin from WordPress MU“. Next, go back to your permalinks in settings once again, change it to Default again, then change back to your Custom Structure and the problem will be fixed. You can disable the plugin once this is done.

Hope this helps!


Related posts:

  1. Giveaway: I Will Build Your Photography Blog
  2. Nikon DSLR Error Messages
About Nasim Mansurov

is a professional photographer based out of Denver, Colorado. He is the author and founder of The Mansurovs, along with a number of other online resources. Read more about Nasim here.

Comments

  1. 1
    ) Darco

    Hi!

    Thanks for the article. I’ve also noticed 404 errors and it turned out that Multipage Toolkit was causing the problem. It’s a shame that I’ve got hundreds of multipage posts that are edited to work with it, do you know any alternative plugin that would do the same (or similar)?

    Best regards!

    • Darco, there is an easy fix for this (I’m running multi page toolkit on 3.1) – just find the line “$wp_rewrite->flush_rules();” inside TA_multi_toolkit.php file (line 336) and comment it out. It will work again after that :)

      • 3
        ) Darco

        Thanks! Tried that and works flawlessly now! Best regards!

        • 6
          ) NursesLabs

          Wow. Been looking for this fix everywhere! Thank God you at search rank 1 for this keyterm :)

          Thank you! Worked flawlessly!
          For those who don’t know how to comment just change

          “$wp_rewrite->flush_rules();”

          to

          /*“$wp_rewrite->flush_rules();” */

          Thanks again!

  2. 4
    ) Big Spender

    Holy heck, that was fast! Thanks a ton for posting this, it worked like a charm.

  3. Thank you for posting this. I narrowed it down to the multi-page tookit as the culprit on my website. What a hassle to find.

    Nasim, you fixed my problem with Multi-Page Tookit with your code fix.

  4. Thank you for this, Nasim! I also had this exact problem with Multi-Page Toolkit and WP 3.1. Now I just need to figure out why the archive.php page says “No Posts Found” regardless of which tag or category I click on.

  5. 9
    ) Ionut

    Thank you!.. i looked up tens of blogs for a solution to the 404 error after wordpress 3.1 upgrade. It works great.

  6. If this doesn’t solve your category/tag link list 404′s (pulldown and top level menus) when you have a custom permalink for Blog Posts, try this “action” function. It’s 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.

    The problem is with 3.1′s canonical redirect. Sometimes, just disabling the redirect fixes the pblm. But, if this doesn’t solve it for you, here’s a more extensive alternative hotfix link. Just put the code in your theme’s functions.php file.

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

Speak Your Mind

*