WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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
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
Milo, what's a good alternative then? Interested minds want to learn! :) – guiniveretoo Oct 12 '12 at 18:19

Your Answer


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.