Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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