I think your approach is not the good one. If I understand well, What you want to do is keeping the old permalinks for the old posts and stick with them, while having the new permalinks only for the new posts.
You should consider having the new permalink structure for all the posts (old and new), and writing a rewrite rule to keep the old links working. For example rewrite /index.php/site/articles/[sanitized-title-with-dashes]-[ID]
into /[sanitized-title-with-dashes]/
. This way, you can send a 301 Moved Permanently
to search engines and have only one permalink structure within WordPress. This will remove the pain and you will not have to bother again about those old permalinks.
Does this sounds good to you ?
Related Posts:
- Permalink structure with $_SESSION variables
- How to add post meta to post permalink with still keeping a good performance?
- How to Use metada Value in Url and is it possible? [duplicate]
- Changing permalinks gives me 404 errors on nginx
- Does WordPress automatically do 301 redirect if I change permalink
- Move WordPress to subdirectory, keep ALL URLs
- ‘post_type_link’ filter not working
- Update URL Snippet to Canonical Permalink URL
- WordPress permalinks Yahoo hosting(no .htaccess allowed)
- How do I turn off 301 redirecting posts (not canonical)?
- Permalink: postname EXCEPT for blog
- %tag% in permalink not working
- Change website URL without breaking links or images? WP 3.3
- Is it possible to list post attachments in a sub URL endpoint with a dedicated template?
- How to edit the slug/permalink in Gutenberg?
- Mass Permalink Changer
- Attachment page 404 not found when image is attached to post
- What happens when permalink settings are updated?
- Change permalink for a single post type only
- How to achieve a clean custom permalink solution?
- How can I make my .htaccess file writeable by wp-admin?
- add new permalink structure from dynamic page
- query_vars in plugin not working?
- Custom taxonomy rewrite using tax name instead of rewrite slug
- How do I get all the URLs from my WordPress site?
- Why is add_rewrite_endpoint incompatible with /%category%/%postname%/ permalink structure?
- Custom query var rewriting with only variable
- Date Archives’ Permalinks under Category folder
- Using WP Rewrite, but just not “getting it”
- get permalink of page children in loop
- Rewrite CPT permalinks and include WPML language
- Need To Add Custom rewrite base url for individual user
- Strange number at the end of wordpress permalinks
- Custom permalink structure gives 404
- Category with the same slug
- Do WordPress Permalinks Refer to a Lookup Table in the Database?
- Post preview gives 404 when permalinks are purely date based
- Permalinks settings
- Changing permalinks structure without loosing SEO
- Change Structure Permalink => Error 404? How to redirect
- Change Buddypress Admin Profile Page Permalink
- how do links move when I move my site?
- Permalink for specific page name
- Permalink for PDF of article
- Comment author url link is wrong? How to change from authors/ to author/
- rename ‘page’ URL fragment in pretty permalinks
- Why can’t change the permalink of my page/post?
- Redirecting “wrong” but working links to their canonical URL in order to prevent search engine penalties (e.g. /123/ at the end of URLs)
- WordPress not generating .htaccess but tells me that (Permalink structure updated.)
- Direct link to post when multiple categories are selected
- Getting an ID from a URL, why can WP do this itself, but none of of the functions provided get it right?
- Ignore postname in permalink
- Big arabic permalinks not work
- Fix 404 error after changing permalink structure
- How can I set up a secondary permalink structure?
- External PHP file & Pretty Permalink
- how to set up wp in folder within static website?
- Help me fix these crazy attachment page URLs (rewrite?)
- Unable to rename permalink
- WordPress permanent links not working (the weird way)
- Permalink Structure not updating .htaccess
- How to enable %postname% permalinks on Mac?
- How do I rewrite attachment urls when permalink structure contains %category%?
- How do I structure my permalinks in WordPress?
- WordPress wildcard route to page
- How to change URL from /%postname%/ to custom-name/%category%/%year%/%monthnum%/%day%/%postname%/
- WordPress Attachment Page URL Rewrite!
- Customize URL for specific tags archive
- Permalink prefix change
- why wordpress keeps redirecting to old page after deleting it?
- Parent/Child Relationships with Multisites?
- Permalink structure /page/page/cpt-post gives 404 with pagination
- Changing permalink structure for Posts
- Rewrite posts url as they’re all children of a page
- WordPress permalinks first word title
- Permalink problem ( Blog posts vs custom post types)
- I can get the permalink or the excerpt to work correctly, but not both
- WordPress permalink issue on AWS
- Permalink Rewrite with Archive – Archive gets 404
- WP Admin Bar not showing with custom permalink structure for pages
- get_permalink wrongfully returns only year and month and not all the link
- Link to most recent child page
- Automatic -1 suffix being added to the permalinks of a page when the page does not exist
- Why doesn’t WP update my .htaccess file?
- WordPress permalink still not working (error or not understood?)
- Permalink for pages
- Pagination is not working, how to trace it properly?
- Problem when i configure permalink
- Getting the top level permalink using get_post_ancestors()
- What is the issue with our links? It creates a loop
- Post URL not working according to permalink setting
- Strip category base from URL?
- Does the error “A structure tag is required when using custom permalinks.” mean my permalinks haven’t saved?
- Error: “Sorry, this content could not be embedded” when using the Embed block
- WordPress Permalinks 404 Not Found
- WordPress 6.1.1 UTF8 Slug Limit Increase
- 301 Redirect posts to newly added categories
- WordPress not remembering old slugs for pages
- make a new structure tag that does some processing
- Website appears with wrong permalink in Google’s search