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.

When I change a slug from post-a to post-b, will WordPress create a redirect from /post-a to /post-b, like HTTP 301 or something similar? If not, is there a plugin for that?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

I just went and tested this (WP 3.3.1), the wordpress core will automatically do a redirect if you change the post slug, even if you change the slug from post-a to post-b and then to post-c, post-a will return a 301 to post-c. That said, the redirection plugin that Mike Jolley recommended is an outstanding plugin and a great way to monitor for 404 errors and such.

share|improve this answer
1  
Just to add a note, this built-in redirection doesn't work when the part of URL that is not the slug changes, e.g. when the pattern is /[year]/[month]/[date]/[slug] and the date changes, WordPress will not create a redirect. A plugin is necessary in that case. –  Borek May 30 '12 at 20:59

This plugin can be used to monitor URL changes like that and set up redirection automatically:

http://wordpress.org/extend/plugins/redirection/

share|improve this answer
1  
If only it worked :( I ended up using wordpress.org/extend/plugins/quick-pagepost-redirect-plugin though it lacks some features. –  Borek May 30 '12 at 21:02
    
Yes, it did work perfectly until at least the middle of 2012 on one of my fairly complex WP installs (always autoupdated as new stable releases are pushed by WP). However something's broken in its autosensing routine for when slugs are modified, I only just noticed today on a 3.5.1 install so can't be sure when this it first stopped automatically adding rules for modified slugs. That's a shame. :( Guess we should all donate to the dev to encourage him to fix the bug! –  Christopher Woods Feb 15 '13 at 14:31

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.