WordPress 3.1 and Permalinks

February 28th, 2011  |  Published in Technology  |  1 Comment

I recently upgraded to WordPress 3.1 and was surprised to find that my permalinks had broken. So I did the usual round of plugin testing, first deactivating and then reactivating, but I couldn’t isolate it as a plugin problem.

Then I moved on to testing the permalink settings themselves, checking (and regenerating) the .htaccess file, then testing alternate permalink structures. And I found, essentially, that 3.1 requires a little more tidiness from me.

Previously, my site had run with this Custom Structure, which overrides the native WordPress category archives but did work until the 3.1 upgrade. Under Admin | Settings | Permalinks:

Custom Structure: /category/%category%/%postname%/

After testing alternate configurations, I found that this structure continues to work in 3.1 without a hitch:

Custom Structure: /%category%/%postname%/

So the issue was my archive system override. (From a usable-URL standpoint, the second structure, /%category%/%postname%/, is cleaner. But it’s disfavored for performance reasons; WordPress documentation indicates that %category% as the first element of a permalink Custom Structure adds database load and slows down the site.)

So providing an alternate Category base, as follows, took care of the problem:

Updated March 1st, 2011.

Tags for this post: , ,

Responses

  1. Luke America says:

    March 24th, 2011 at 12:57 pm (#)

    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

Leave a Response