How To Change Your WordPress Permalinks & Setup 301 Redirects?

Changing your permalinks on WordPress is easy, but setting up your 301 redirects to your new permalink can be a pain. After reading this, you’ll be good to go!

I’ve been meaning to write this blog post for some time now but have been putting it off because it was a huge headache. Then, I realized that if it was such a pain in the ass for me, there are probably hundreds of others looking for the solution too.

Not everyone had access to a Website Roadmap Checklist, so there are probably many websites out there with extra information in their URL that ends up hurting SEO.

How To Change Your WordPress Permalinks

1. Visit Your WordPress Admin Dashboard

There are two ways you can get to your WP admin page. You can either type “” or finding the WordPress admin link in your regular WordPress dashboard at the bottom left.

wp admin.png

2. Access Permalinks In Your Admin Settings

Once you’re in the Admin Dashboard, navigate to your settings and click the “Permalinks” button.

settings to permalinks.png

3. Change Your Permalink Structure

The best permalink structure for improving SEO is “Post Name” – you can remove date stamps or change your link structure from “Plain” (probably the worst structure of all).


4. Download The Redirection Plugin

The Redirection Plugin works for both and .org websites. You can read all about the installation on the Redirection website.


5. Input Redirect Code

Whenever you visit the new plugin, you will automatically be presented with a “new redirection” form below your (empty) redirect logs. The code you input will depend on what your previous permalink structure was.

To change the permalink structure of the entire website and every single blog post, you will need to utilize the REGEX function.


After you’ve selected REGEX, the new form should remove the query parameters.

redirect code.png


View the entire tutorial to understand what each character/code piece means.

Redirect day and name permalink:

Source: ^/\d{4}/\d{2}/\d{2}/(.*)
Target: /$1/

Redirect month and name permalink:

Source: ^/\d{4}/\d{2}/.*?/(.*)
Target: /$1/

Example: /2017/01/01/thing/ => /thing/

Redirect month, name, and category permalink:

Source: ^/\d{4}/\d{2}/\d{2}/.*?/(.*)
Target: /$1/

Redirect all URLs to /blog/ except ones that start with /blog/:

Source: ^/(?!blog)(.*)
Target: /blog/$1

Example: /old-post-url/ => /blog/old-post-url/

Redirect every page on old site to new site:

Source: /(.*)

Example: =>

6. Test Your New URLs (On-Site)

Changing the permalinks on a WordPress website should automatically update all internal linking, but double-check to be sure that your links work.

7. Test Your Social Links (Off-Site)

The biggest issue with changing your permalinks is that it will break every socially shared link from your website if you don’t do your redirects correctly. Before you change your permalink structure, tweet or pin an article as a test.

Finally, after you’ve input your new source and target code, click the tweeted/pinned link to see if it redirects properly.

Still having issues after reading this redirect tutorial? Contact WordPress support to see if they can help or email Redirection directly for a deeper understanding of what might be going on.

Leave a Reply