I just converted my posts from the default 'post' type to a variety of different custom post types based on what category the post is in. E.G. Posts in the "News" category are now a custom post type called "article_news".

Of course, with this my permalink structure changed, leaving me with a bunch of rotten links.

I backed up the database prior to conversion so it is possible to restore and repeat the process if necessary.

Is there a plugin or any method I could use to have these old links 301 redirect?

  • For example, I had posts at the URLs mysite.com/2012/07/10/%postname% and they have moved to either of several possible locations like mysite.com/news/2012/07/10/%postname% or mysite.com/sports/2012/07/10/%postname% or mysite.com/living/2012/07/10/%postname% where news or sports or living in the new URLs (the post type) reflect a post type conversion based on the post's category. Jul 11, 2012 at 12:17
  • Basically it looks like Redirection won't help me because the new URL contains strings that weren't in the old URL. Jul 11, 2012 at 12:53

1 Answer 1


There are many plugins for this.You can simply search with "301 redirect wordpress".

Here are two plugins will allow you to match all old urls to new url and do 301 redirerct.



  • I'm aware that plugins exist to help with this. I have Redirection installed, however I'm not familiar enough with RegEx to understand how to use a complex redirection rule like this. Jul 11, 2012 at 12:11
  • Chris have you at least tried Rajeev suggestion ? the second link wordpress.org/plugins/redirection/screenshots look visual enough to help you find your way, combine with a service like phpliveregex.com you'll be on track to do what you need ! But anyway, has far has I understand what you're asking, you don't need regex, you'll need to make one rule per article, because there's no hint on where "news" come from... Jun 5, 2014 at 2:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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