wp 3.1 permalinks still broken after many trys with fixes described (35 posts)

  1. estern23
    Posted 4 years ago #

    This was posted in a resolved thread but i have opened it up as it has not been fixed for me.

    I unlike a lot of people am still having issues with the wp 3.1 permalinks.

    I heard from users that categories ( the_category() in the loop ), post linking ( the_permalink() in the loop ) from index and categories sidebar ( using wp_list_categories() ) bring up 404 pages. I am using the custom permalink structure of /%category%/%postname%/ (which i thought was the most popular way, and featured on the wp help page).

    What I have done so far:

    - Started off by doing a clean install (new db, new folder on my dev server). Downloaded wp 3.1 and installed it in the new folder via my FTP client. Did the normal setup that i do all the time (100s of times before). Things were functioning from a wordpress standpoint except for the stated issues above (category and post pages getting 404s).

    - So since it was a clean install there were no plugins that might be causing the permalink issues. But i went ahead and deleted the two default ones that come with WP 3.1 just to make sure (even though they were still disabled). Still getting 404s.

    - So then i proceeded to do the suggested .htaccess delete and respawn action. Did this as described by many sites and still had the same issue. I did this like 10 times.

    - So i was starting to think it was my theme... So i turned off my theme and reverted to the default (twenty10 theme). Keeping my permalinks set to /%category%/%postname%/. The same issue was happening with this theme. So this is what made me think that it was not my theme and more of a WordPress 3.1 issue.

    - If i set my permalinks back to default, they of course work fine, but i have thousands of people using my theme and use the custom permalink structure. So I am afraid that those people are a.) going to have broken sites if they upgrade and b.) have broken links if they revert to the default permalink structure.

    - I tried to install the hotfix plugin and that did nothing.

    - I made sure that my code was not chaining permalinks like some of the plugins that were causing the issues. Nothing there to cause my troubles...

    The only other step that i have not done was install another instance of wp 3.1 in a completely different folder on my server... I was saving this as a last effort if there wasnt a fix that someone uncovered.

    So that is where i am and what i have done. Hope that this is clear and links you to a possible solution.



  2. Try INSTALLING one of these two plugins:

    FV Top Level Categories
    Permalink Fix & Disable Canonical Redirects Pack plugin

  3. estern23
    Posted 4 years ago #


    - I installed "FV Top Level Categories" plugin, then tested to see if it did anything. NOTHING different. Then deactivated it.

    - I then installed "Permalink Fix & Disable Canonical Redirects Pack" plugin, then tested to see if it did anything. It is now just keeping me on the home page when i click on post titles, category names.

    - I then tried to have both active to see if they worked together for some reason and got the same result as the second part.

    Still a no go...

  4. Does it work when Permalinks are turned off? Like do the ugly Ugly works?

  5. estern23
    Posted 4 years ago #

    Yah they work fine when those are set to default. just goes to ?p=1 etc.

    here is my demo site:

    Keep in mind that none of the pages are built out besides the standard pages that wordpress needs to function.

    You can see here that if you click on the post name that wordpress created or the uncategorized category link you will get a 404 page...

    Not sure what is going on...

  6. I am using the custom permalink structure of /%category%/%postname%/ (which i thought was the most popular way, and featured on the wp help page).

    What happens when you use the default pretty permalinks? YYYY/MM/DD/POSTNAME?

    And what kind of server are you on? *NIX or IIS?

  7. estern23
    Posted 4 years ago #

    I tested the following:

    - I Set the permalinks to: Day and name: /%year%/%monthnum%/%day%/%postname%/
    Like you suggested. Then the post links ( the_permalink() in the loop ) goes to the post correctly. When i click on a category ( the_category() in the loop ) it goes to a 404 page.

    - I Set the permalinks to: Month and name /%year%/%monthnum%/%postname%/
    As described above it goes to the post ok, but doesnt go to the category links, just 404 for these.

    I am using 1and1 for hosting, they use Linux.

  8. kenrik
    Posted 4 years ago #

    Running OSX 10.6 Server here.. self hosting with Comcast Business and a Mac Mini Server.

    All permalinks except for "default" are borked.

    None of the fixes work. Everything worked perfect prior to the update.

    My theme is now broken on my network sub sites now too.

    This is not a production site.. (Yet) it's in development but it still sucks to divert so much of my time to fixing things that were working perfect prior to the update.

  9. kenrik
    Posted 4 years ago #

    Little bit of an update here. I tried 3.1 on my backup testing server (hosted by inmotion - Linux)

    permalinks work on that site with the same theme/plugins!

    Now I'm really confused! for some reason wordpress 3.1 does not like my OSX Server :(

  10. I spun up a test site and cannot reproduce this, which given kenrik's problem, makes me think it's a server side issue. I've so far only seen it on IIS, though.

    estern23 - Make sure you have this at the top of your .htaccess at your webroot.

    AddType x-mapp-php5 .php
    AddHandler x-mapp-php5 .php

    1&1 can be weird.

  11. kenrik
    Posted 4 years ago #

    I was thinking about it and I wonder if it is a permission related issue. I have custom permissions on some of the folders (like 644 on wp-content) and maybe it did not upgrade cleanly even though it did not throw up any errors? When i get home from work i'll manualy install the 3.1 update with stock permissions to see if that works.

    Php 5 is the only version of php i have on my server? Why would i need to define it?

  12. estern23
    Posted 4 years ago #


    I did as you suggested for the 1and1 fix. I remember having to do this in the past so it would know it was php5.

    DIDNT FIX IT, I still get 404s after adding this into the htaccess.

    I do appreciate your help in trying to track down the issue here...

    Any other thoughts?


  13. estern23
    Posted 4 years ago #

    I did a test...

    I created a new wp 3.1 instance and just set it to the custom peramlink ( /%category%/%postname%/ ) that i have been using and using twenty10 theme. The theme works fine now...

    So now it must be something with my theme... double ugh.

    I am thinking that it must be something in the archive.php page since that handles the category pages and or the single.php page.

    I am going to try to extract these sections into my theme from the twenty10 theme and see if i can pin point the exact issue at hand.

    I dont know what i will find but think this is where the issues are now.

    If you have any insight to where i might look besides these two theme template pages that would be awesome.



  14. I'm ... glad? it's a theme? No. I'm not, but I'm relieved it's not broken for everything. I did make a trac ticket for this, since there IS a chance WP broke this, after all, and that's why it's DOA now.


    If you have insights, please share them! And thank you for sticking with debugging hell! I appreciate it :D It's much better to work with people on these things.

  15. estern23
    Posted 4 years ago #

    Thanks for submitting this to the TRAC... I hope they agree that it is a WP issue and don't close it.

    I too still think that it is WP core code that is the culprit here since it was fine before and there were no changes made to the theme in recent months.

    I hope to find what is going on and report back my findings. Maybe i can track it down to a function or something...


  16. estern23
    Posted 4 years ago #

    Looks like it was added to 3.1.1 lets hope that they can track down the issue.

    I am still struggling with what is wrong and leaning back to the wp core code vs the theme...

  17. Well, it SOUNDS like a combo platter of theme + WP changes + (in one guy's case) server.

    SOMETHING went weird, though, I agree! I mean, while using category in your permalinks isn't a good idea anyway, it shouldn't break! (You can read http://otto42.com/w to see why it's a bad idea to use).

  18. estern23
    Posted 4 years ago #

    Yah i came across this yesterday and gave it a read. Not sure that i completely agree with the NO SEO impact part, but i will not go down that road.

    Problem that is at hand is a LOT of users that have a LOT of pages that use this permalink structure... I cant just say screw that and just use another one... it will break a lot of links that they might have. Plus going in and changing permalinks and/or setting up redirects is a big task to ask someone to do.

    I am not saying that you said this is what i should do, just stating a concern of mine. :)


  19. rickbass
    Posted 4 years ago #


    I'm running into the same problem except it's my pages, not posts, that are throwing 404. I am using custom permalinks /%category%/%postname%/. I've followed all suggested steps including:

    • Disabling all plugins
    • renaming plugin directory
    • installing the hotfix, Permalink Fix & Disable Canonical Redirects Pack & Top Level Categories plugins (the second redirects to the index page)
    • Switching to TwentyTen theme
    • removing my .htaccess

    I then tried a clean install of WP 3.1 and it the problem persists. This occurs locally on OS X (MAMP) and on my Linux production which is hosted by Media Temple.

    Thanks for your assistance.

  20. estern23
    Posted 4 years ago #


    Glad to see this is not just me...

  21. kenrik
    Posted 4 years ago #

    Sounds like it's possible that some flavors of unix (including OSX) don't play well with 3.1 and permalinks?

    We would need more input from people who have this problem as to what OS they are hosted on.

    As far as pretty permalinks go, most people don't want their content dated and that's why they use /%category/%postname%

    Due to that article I might add a number in there like "%time%" but nothing that the user can tell the date from. I don't want my users to know when my content was posted and I don't want them to know what CMS I use.

  22. rickbass
    Posted 4 years ago #

    @estern23 misery loves company.

    @kenrik I just tested the following:
    - Added /%year%/ to the beginning of my custom permalink. This did not resolve the issue.
    - I then appended %year%/ to the beginning of the category base (%year%/%category%/%postname%) and this resolved the issue for both posts and pages.
    - I removed /%year%/ from the custom permalink field (leaving it in the category base) and everything still works. Of course, posts do display the year they were created in the URL while pages do not.

  23. kenrik
    Posted 4 years ago #

    Can Someone please post a wordpress 3.1 multisite default .htaccess?

    My site will not generate a new one!

  24. kenrik - It's exactly where it's ALWAYS been: http://codex.wordpress.org/Create_A_Network#.htaccess_and_Mod_Rewrite

  25. estern23
    Posted 4 years ago #


    I finally figured out what was going on with my situation after upgrading to wp 3.1.
    I spent many hours looking through theme code and found the culprit in my functions.php code.

    I had this tidbit defined which was causing the issue after upgrading:

    Once i removed this from my functions.php code and updated my permalinks settings page by clicking the "Save Changes" button to rebuild the .htaccess file, I was good to go and back fully functioning.

    That was it for me. So for other that might be having similar issues like the ones that i had, I would look into your functions.php file for this type of code.

    Hope this helps someone out there! I can now rest at night...



  26. SassKwatch
    Posted 4 years ago #

    This is NOT a theme issue. I have a completely fresh v3.1 installation w/ only the default TwentyTen theme and am having exactly the same issue. If I use anything other than the default permalink option, I get 404 errors for any 'POage' that is added.

    This has started today with the fresh install that includes the ability to install 'JetPack'.

    I had an earlier 3.1 installation that did not exhibit this problem.

  27. jigarnagar
    Posted 4 years ago #

    I am new in wordpress . i have install the wordpress 3.1 in server using FTP. i am facing permalink issue in wordpress 3.1 when i changed my permalinks to custom structure so it is not showing me my domain URL in browser.

    Then i did a lot of searching for permalink issue so i found that i have to create a .htaccess file and put it into
    root folder and added following code in it.

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    # END WordPress

    and then i changed my permalink to my custom structure.


    but it is not showing me my base URL.

    Example :


    It is not working but when i used following URL directly like


    so it is working and if i click on any internal link in it so it is working fine but base URL is not showing me .
    I already have spend a lot of time to solve this issue .
    Basically i am java programmer so i dont have any idea about PHP so how could i solve this issue.

    PLEASE PLEASE PLEASE Help me to solve this problem.

  28. Luke America
    Posted 4 years ago #

    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.


  29. DannyB
    Posted 4 years ago #

    Just chiming in that a 3.1.1 upgrade broke my permalinks for Pages only.

    Permalink structure was set to /%category%/%postname%/

    Tried without Plugins and switching Themes.

    I am on a Solaris (unix) Server.


  30. Adam
    Posted 4 years ago #

    Chipping in my two-penneth.

    Multiple sites, multiple hosts, some Windows, some Linux. All are running 3.1.1.

    Those that have /%category%/ in the pretty permalinks appear to generate correctly (i.e. the hyperlink is site/category/... but when accessed result in a 404.

    Happy to run any additional tests anyone needs to help resolve this.

Topic Closed

This topic has been closed to new replies.

About this Topic