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

If I change my permalink structure, is there is a nice way to handle when people/bots go to the old structure?

I presume I can add use .htaccess and write a rule to redirect based on a 301 but is it possible in my case?

I currently have site.com/%year%/%month%/%day%/%postname% and I will just want site.com/%category%/%postname%

share|improve this question
up vote 2 down vote accepted

Dean's Permalink Migration has always worked for me. Install it before you change your permalinks.

share|improve this answer
afaik Dean's thing is no longer available / working. – cwd May 24 '12 at 5:32

For people, you can try Smart 404.

share|improve this answer

I would recommend two plugins for this: either Redirection - a good way to manage your changed urls / permalinks, and 404 Redirected, which is good for logging and manually fixing permalink errors.

share|improve this answer

You can typically perform the 301/302 redirect in the functions.php file of your theme.

Here is one of many references you can find - http://perishablepress.com/permanent-301-redirect-via-php-or-htaccess/

share|improve this answer
Seems like that reference only covers static urls. The question is clearly in regards to dynamic urls. – AlxVallejo May 14 '13 at 17:42

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.