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.

After a major site review, we've created a new link and category structure to better accommodate URLs and content for the long-term. While we roll out the change, we need to avoid broken links and SEO issues because our category structure is changing.

While best practice is to implement a 301 redirect, is there a solution to automatically redirect all previous categories? Or at least handle it in an efficient way within Wordpress Admin?

Why this isn't a duplicate: This is focused on category changes, not just a few changed URLs.

Thanks.

share|improve this question
    
You can almost certainly accomplish this with an edit to your .htaccess file. If you would care to provide more details (the old category/link structures and the new ones), I/we can help you craft the lines you'd need to add. If there aren't that many, and you want to do it from within wordpress, check out wordpress.org/extend/plugins/simple-301-redirects –  Matthew Boynes Jan 29 '12 at 19:52
    
That plugin might be all that's necessary. An admin-integrated solution is best (.htaccess is hard for non-tech) because owners of the site get control, too. –  crockpotveggies Jan 29 '12 at 19:56
    
I believe that when you change category name/permalink, there's a built-in feature in WP that redirects automaticaly to the new name. Easy to test. Not sure if you get a nice 301. –  Simon Jan 29 '12 at 19:58
    
Cool, glad that helped! I'll post it as an answer so others can see it easily. –  Matthew Boynes Jan 29 '12 at 20:00
    
@Simon not as far as I'm aware. I just did this on my site and nothing of the sort happened, thought it might be an issue with my site. Not having more than 1 site I've done this on I can't say definitively. –  m0r7if3r Jan 29 '12 at 20:07
show 3 more comments

2 Answers

up vote 0 down vote accepted

For a large number of redirects, using your .htaccess file is the way to go (assuming you're using apache). If you aren't doing an unreasonable number of redirects and want control within WordPress' Admin, the aptly named Simple 301 Redirects is a great option.

share|improve this answer
    
I found simple redirects worked a little better for this particular use case. Thanks for sharing! –  crockpotveggies Jan 30 '12 at 7:49
add comment

Check out the Redirection Plugin, personally I love it. The log feature is great for keeping an eye on any pages you might have missed and it can do regex redirection through wordpress, or .htaccess...I've heard it works on ngnix as well but have never had the opportunity to test that, so YMMV.

If that's not an option, just go .htaccess and do it by hand, you'll needa regex it or it'll be a MESS (for example, redirect /old-category/* to /new-category/* rather than /old-category/page1/ to /new-category/page1/ and /old-category/page2/ to /new-category/page2/)

share|improve this answer
add comment

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.