Turns out the process is simple.
First, reset the permalinks to the old permalinks.
Then, using the RankMath plugin, from general settings –> Auto post redirect, activate this option and make it on.
Then, change the permalinks structure to the one you desire, and the plugin will automatically do it for you!
Related Posts:
- Changing permalinks gives me 404 errors on nginx
- How does WordPress handle permalinks?
- Removing the redirect after changing a page’s slug
- Setting 404 page in Nginx
- 301 Redirects for Changed Permalink Structure & Category Base
- URL rewrite based on a custom field value
- How can I force WordPress to redirect to canonical permalinks?
- How do I turn off 301 redirecting posts (not canonical)?
- Subdomains to pages
- Redirect old permalinks to new permalinks
- Passing variables through permalink structure
- + Character in permalink
- How can I include a query string with get_permalink
- How to remove the index.php in the url?
- Permalink redirection from ‘Day and name’ to ‘Post name’
- Homepage loads but all permalinks are 404 when using nginx & PHP-FPM
- Nicest way to 301 Redirect traffic when changing permalink settings
- nginx – permalinks with .php in url not working
- Changing pemalink structure to /%post_id%/%postname%/
- htaccess or redirect to cloak portion of a link?
- Redirect short-form URL to long-form URL (post_id to post_id + post_name)
- Auto 301 to full post permalink? (using /posts/%post_id%/%postname%)
- Enable Minify in W3Total Cache using NGINX [closed]
- WordPress on VirtualBox – no pretty permalinks
- Stop redirecting to posts not in a category / duplicate slugs
- WordPress 3.4 Permalinks Redirection Problem
- Random Alphanumeric Key URLs
- Redirect old permalinks with Month and name to Post name on new site
- Rewrite-Rules not working on a vhost, everything goes to index.php
- Using WP rather than .htaccess to redirect pages/posts
- Does WordPress send a 301 header message when you change permalink structures?
- .htaccess – Redirect duplicated post ended in ‘-number/’ to the same url without the -number/
- Top level Pages redirecting to homepage!
- WordPress redirection problem after moving to a new server?
- Specific URL Rewriting with parameters in wordpress
- How to 301 all posts
- WordPress within specific sub-directories, implicitly not root
- Permalinks keep reverting to 404 unless I re-save them
- WordPress installation in subfolder not working with nginx
- Get canonical link
- Post incorrectly displaying as page
- wp_logout_url redirects to incorrect page because of pagination
- If I change permalink structures, can I use htaccess to permanantly redirect links?
- Redirect parent taxonomy to it’s child
- WordPress blog posts permalinks giving 404 on nginx
- Need Help Correct Regular Expression Redirect Code
- Infinite redirects after changing the permalink of a page
- Does rename of page slugs create 301 redirects from old slug to new (same as for posts)?
- After updating to 4.8 permalinks will not work (all 404)
- Custom Permalink
- Server Move: All pages leading home
- WordPress Permalinks & Nginx Rewrite Rule Not Working
- How do I fix permalink and media library issues on a LEMP stack?
- Changing the post date without causing 404 error
- Nginx Rewrite Rule:: index.html added to every permalink
- Change permalinks on move from one site to another
- List / Get post redirects
- WordPress post-name permalink redirects to site.com
- WordPress Pages Redirecting to Root with WordPress Multisite (Sub-Directory)
- Redirects after permalink change
- NGINX serve WordPress from sub-path fails with 404, how to fix?
- Redirect /%year%/%monthnum%/%day%/%postname% [closed]
- How to 301 redirect from one url to another properly
- Redirect a Blogger Page URL to wordpress
- Redirecting all posts after changing URL structure with htaccess
- Redirect all posts permalinks from “.html” to “/”
- After updage wordpress 4.4 to 4.5 nginx config works not properly
- WordPress 4.4 old permalink redirect
- how to redirect old blog post urls when permalinks are changed
- Htaccess https 301 problem
- Nginx url rewrite rule problem
- 301 Redirect for Non-Date Based URL’s
- Passing the JQuery string to Worldpress URL
- How to use different domains for different blogs hosted in the same host in subdomains with .htaccess
- How do I make 301 redirection from `/%post_id%/` to `/%postname%/`?
- Freeze child page URLs so parent permalink changes don’t give 404s?
- Permalinks settings
- How can I make internal anchor links work with WordPress’s permalinks?
- Resolve 404 on posts without category
- What causes /pages/ to appear in URI, and how to remove it?
- Media/attachment urls don’t redirect with fake URL structure
- Some Pemalink problems, probably caused by wrong .htaccess configuration?
- Test site pages go to main site
- Comment author url link is wrong? How to change from authors/ to author/
- Strange behavior with a redirect loop – involves WPML multi-language plugin
- Redirect From Url To Url
- I’ve removed my /author/ slug but it clashes with new and existing pages. Any fixes?
- Redirecting “wrong” but working links to their canonical URL in order to prevent search engine penalties (e.g. /123/ at the end of URLs)
- After cloning WP do a subdirectory, I can’t access it
- change WordPress permalinks and redirect new urls 301
- Arabic permalink redirect to home page
- Getting an ID from a URL, why can WP do this itself, but none of of the functions provided get it right?
- Custom permalink structure with %postname% in front of domain name
- Configuring Home Page Address
- Redirect after permalink changes
- Passing variable as permalink URL
- Blogger To WordPress Permalink Redirection
- new page redirect to old page which had the same permalink
- Multiple sites with pretty permalinks with nginx
- Permalinks and page store