How can i edit all posts slug in bulk keeping WP native redirect?

Question

When i edit a single post slug the old url redirects to the new one automatically.

I need to do this in bulk.

There is a text that appears on thousands of permalinks and i want to remove it from them all and keep wp native redirect, because this text appears in random places i cannot make an htaccess rule for all posts.

So for example:

http://example.com/cpt1/hello-world-unwanted-word/
http://example.com/cpt2/unwanted-word-hello-world/
http://example.com/cpt3/hello-unwanted-word-world/

Should become:

http://example.com/cpt1/hello-world/
http://example.com/cpt2/hello-world/
http://example.com/cpt3/hello-world/

If someone access the old url redirect to the new one.

--------------------------------------------------

>>> Share a link to this question, just copy and paste the code bellow on your web page <<<

<a href="https://www.wptricks.com/question/how-can-i-edit-all-posts-slug-in-bulk-keeping-wp-native-redirect/">

How can i edit all posts slug in bulk keeping WP native redirect?</a>
0
, , Michael Rogers 8 months 0 Answers 49 views 0

Leave an answer