How to change post slug in WordPress site and save relative posts

Place this code in functions.php of your wp current theme:

Replace all WRITE-OLD-SLUG-HERE and WRITE-NEW-SLUG-HERE to slugs you need then refresh home page of your site. After page refreshing remove the script from functions.php file.

That is all.

Leave a Reply