Is it possible to change a permalink structure on a exist website with a substantial amount of posts/pages
Yes, it is possible, but it may result in broken links depending on what permalink structure you are changing from, and what permalink structure you are changing to, unless you take some action to redirect the ‘old’ URLs to the ‘new’ URLs.
Recommended Permalink Structures
We recommend the use of the following permalink structure for new sites: /%post_id%/%post_name%/ as this offers you plenty of flexibility such as changing the post title and post category slugs without having to get involved in adding extra redirects.
Other permalink choices are acceptable with some caveats:
- /%post_name%/– if you are not going to change the post title and do not have many similarly titled posts
- /%post_name%-%post_id%/ – if you want to publish to Google News
- /%category%/%post_name%/ – if you have a single stable category per post and a meaningful category slug keyword, and are careful not to use that slug in custom post types or at the start of page slugs
Do Not Change The Permalink Structure For Large Sites Unless You Really Need To
For large existing sites then leaving the permalink structure unchanged is best if you have already SEOed your post title and slugs and are unlikely to want to change them. The last thing you want is Google de-indexing most of your site.
If you do want to change the permalink structure then typically this is done by adding redirect rules in the .htaccess file if your site is running on Apache. Depending on the permalink change required there may be a chance of doing it with a single RedirectMatch instruction. In the worst case scenario you would need a separate instruction for every page/post. If you do find you have to generate lots of redirect instructions, it should be possible to generate them automatically and then paste them into the .htaccess file.
Alternatives to using the .htaccess file include using a redirection plugin or writing some custom code that populates WordPress’s own “rewrite_rules”. We are not keen on the plugin route.