I was using this WordPress permalink string.


but now I want to change it to, and redirect all old URLs to new URLs


Sample old URL is:


The new URL will be:


My .htaccess file is currently using default WordPress vars. How can I 301 redirect all my old URLs to new URLs?

I tried to use this, but it's not working.

  • The "WordPress permalink string" which you say you were using does not match the "sample old URL" you have given? "I tried to use this" - You tried to use what?
    – MrWhite
    Aug 29, 2017 at 19:06

2 Answers 2


Just choose Plain permalink settings on /wp-admin/options-permalink.php page. Wordoress would auto redirect all posts.

  • 2
    It should be pointed out that when changing permalink structure, the redirect that happens is basically a guess using a LIKE query on the slug. There are cases where you will end up getting redirected to the wrong post.
    – Milo
    Aug 29, 2017 at 19:05

Use the below snippet that's for another question that i have already respond:


  • I think that does the opposite of what this question is asking?
    – Rup
    Jul 19, 2023 at 14:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.