Is there a way to update all internal links (in pages, posts, cpt...) when a permalink is updated?
Eg: I have a page exemple.com/mypage
, and this page is linked in other pages and posts. If for any reason I decide to update the permalink of mypage
. All the internal links to this pages are not updated, and if my name is totally different to the previous one, I get 404 errors.
I'm thinking about two solutions:
- Using shortlink in the link selector, and convert the permalink only on page rendering (like typo3 act). And optionally keeping history of the previous permalinks to manage 301 redirections.
- On permalink update, search / replace all the concerned permalinks in the database. Optionally keeping history of the previous permalinks to manage 301 redirections.
Any one knows if wordpress can be set to act like this? Or if any plugin already exists to achieve this job?
Thanks