I am changing my permalink structure from /%year%/%monthnum%/%postname%/ to /%category%/%postname%/.
Is it possible to redirect old links using old permalink structure to the new link? Possibly via the postname?

2 Answers 2


Wordpress should handle all redirections correctly, without you needing to worry about them. For example, if your old post was http://example.com/2012/10/11/i-like-stackexchange any links should auto-magically be redirected to http://example.com/favorite-things/i-like-stackexchange. I just tested it on a site with Wordpress 3.4 installed, and it worked just fine. Wordpress can read your mind.

  • 4
    while this does work in most cases, it may not be the most efficient way to handle it. WordPress isn't aware of your previous permalink structure and uses a LIKE query to find the closest match. You can see the mechanism responsible for this in wp-includes/canonical.php function redirect_guess_404_permalink.
    – Milo
    Commented Oct 12, 2012 at 5:05
  • Oh right, I wasnt aware WordPress has such a feature.
    – Imran
    Commented Oct 12, 2012 at 15:55
  • 2
    Milo, what's a good alternative then? Interested minds want to learn! :)
    – Jen
    Commented Oct 12, 2012 at 18:19

When you change your permalinks WordPress doesn't always catch all the URLs that were changed. Luckily, there is a code solution from yoast: https://yoast.com/research/permalink-helper.php

Enter the old structure, new structure, and it outputs redirect code.

Works every time I used it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.