Best way to 301 redirect hundreds of posts to a new permalink?

I have to convert *hundreds* of existing posts to a new post-type, with an entirely different permalink structure. The current permalink structure for posts is url / YEAR / MONTH / TITLE, the new permalink structure will be url / SLUG / YEAR / MONTH / TITLE

What I’m confused about is, if all these posts are converted to this new post type with a new URL, and the old post is now gone, how are all the old permalinks preserved as 301 redirects? Do I actually have to keep the old posts, *copy* them to the new post type, and then redirect the old post, or is there some way to write all these redirects and get rid of the old posts?

2 Comments
  1. https://wordpress.org/plugins/redirection/

    > There is full support for regular expressions so you can create redirect patterns to match any number of URLs. You can match query parameters and even pass them through to the target URL.

    > The plugin can also be configured to monitor when post or page permalinks are changed and automatically create a redirect to the new URL.

    One of those two features should take care of what you’re trying to do.

  2. I spoke too soon. It turns out that the Redirection plugin handles all of this automatically, including changes from one post-type to another. So this is solved.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer