Support » Requests and Feedback » Now that permalinks have been fixed-how best to go about changing the structure?

  • I currently have my permalinks set up as day and name. Have posts going back to August 2010 with that structure. Now that 3.3 removes any performance penalties with use of categories in the permalink, is there a reliable method for changing without 404 errors or need for extensive 301 work?

    I have seen a number of plugins for this but most have fallen out of support or have a number of users reporting loopback errors. Would adding info in the htaccess be enough to fix this? Any possibility that WP will allow setup so that permalinks could be setup as ‘past’ and ‘future’ structure?


Viewing 15 replies - 1 through 15 (of 15 total)
  • In most cases, WordPress actually is smart enough to do that on it’s own. But if you’re concerned, tou’d be best served by doing it via .htaccess.

    RewriteRule ^([0-9]{2})/(.*)$$2 [L,R=301]

    That looks for anything that starts ##/POSTNAME and turns it into POSTNAME 🙂 Put it above the START WORDPRESS line.

    Done and done.

    Thanks Ipstenu. Appreciate the help!
    My issue isn’t so much WP internally, it’s every FB page post and every incoming link I’ve managed to build up over the past 18 months. Plus a few internal links from one post to another.
    This is the rewrite rule I got from a site meant to generate such a redirect:
    RedirectMatch 301 ^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*)$$4

    However, that was to essentially change over from Day and Name to just Postname.
    Ideally I would like to change to:

    Would rules in the htaccess also serve to redirect links to specific posts with the Day and Name permalink structure to the new location?

    Thanks again!

    The town part is a fixed term by the way. I just realized that I chose a domain without a keyword I needed and was going to fix that by inserting the town name in the url as part of the permalink structure.

    Ah so your URLs were YYYY/MM/DD then 🙂 (you said “I currently have my permalinks set up as day and name.” so I assumed it was just DD/NAME)

    But yeah, that’s what I do too.

    And if you want category/postname, just change the permalink to that, BUT keep the .htaccess redirect the way you did. WordPress will take and on its own redirect you to the right place 🙂 How cool is that?

    So I added the rewrite rule and updated the permalink structure
    However, when following a link on my Facebook page (which has the yyyy/mm/dd/name structure) or Google links to specific posts, I get a 404 error.
    Any suggestions?

    Also, internal links – such as when I manually inserted a link to another blog post in the text were also broken and led to a 404 page.

    I reverted back to the year/month/day permalink for now.

    Really hoping I can fix this though.

    Try this one:

    RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*)$$4 [L,R=301]

    Sometimes that works better than a Match.


    It is now sending me to

    I need it to send me to

    I have tried custom permalink as /%category%/%postname% with a optional category of Town

    And I’ve tried custom permalink as /town/%category%/%postname%

    If I type into the url bar after getting a 404 and manually add in the /town/category it works! Do I need to add those to the end of the rule?

    Not sure if it matters but I do use W3 Total Cache and CloudFlare

    I have emptied all caches after each step above

    Turn of w3tc while you’re playing with this 🙂

    Try RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*)$$4 [L,R=301]

    Set your permalink to /town/%category%/%postname%

    WordPress SHOULD go from to

    Though there’s NO way to dynamically generate the category in the htaccess.

    Thanks for your help and patience with all of this!

    Turned off W3TC
    Used the new rule and permalink

    If I put in the category in permalink, external links broke. If I inserted the correct category into the url, it worked.

    Changed it to /town/%postname%/ which seemed fine until I followed a Google Tag link which broke because its url was— and was missing /town/ before the /tag/

    I’m not sure why WP isn’t correctly sending me to the address based on the permalink rules

    I have reverted back to Day and Name permalink structure for now (ie YYYY/MM/DD). By the way, I’m only doing this with the expectation that it will make a big difference in my SEO. If the url words are not strong elements in SEO, I’m happy to drop this.

    Thanks again,

    until I followed a Google Tag link which broke because its url was— and was missing /town/ before the /tag/

    Hrm. Yeah, adding in /town/ is going to make it trickier. If you JUST went to, you’d be better off.

    Thanks Ipstenu.

    Not sure what domain/postname has to offer in comparison to domain/year/month/day/postname

    Ideally (and only for SEO purposes), I would like to have domain/town/category/postname. Potentially I could use town under the optional category base in the permalink settings though that doesn’t seem to work regularly when i try it out.

    Not sure why WP isn’t taking the domain/postname and following the set permalink rule to send that to domain/category base/category/postname

    I should explain this better.

    WP can take and go to

    It can take and go to

    It CANNOT go to

    That said? The SEO difference between and are … zilch. Zero. Zip. Nada.

    The HEO (human experience opt.) is minimal but a valid point. is shorter and, thus, more likely to be remembered.

    Thanks. Without any SEO difference there really is no reason for me to keep pounding away at this. I’ll just rest with my less than perfect choice of permalinks when I set up the site in August 2010 and let it go at that.

    I really do appreciate all of your help.


Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Now that permalinks have been fixed-how best to go about changing the structure?’ is closed to new replies.