1

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?

1

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.

  • 3
    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 Oct 12 '12 at 5:05
  • Oh right, I wasnt aware WordPress has such a feature. – Imran Oct 12 '12 at 15:55
  • 1
    Milo, what's a good alternative then? Interested minds want to learn! :) – guiniveretoo Oct 12 '12 at 18:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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