How to change the Permalink structure in WordPress without invalidating old links

If you want to change the Permalink structure of your WordPress site under Settings -> Permalinks, e.g. from Day and name to only Post name, you should prevent the old links from resulting in a 404 page and instead redirect them to the new URLs. If you don’t preserve the old links, search results e.g. from Google may link to not existing pages and your visitors will almost always leave your site instantly.

Change the Permalink structure in WordPress

The solution to this problem is the WordPress plugin Safe Redirect Manager, in which you can configure 301 redirects with Regular Expressions. Simply install the plugin and configure a redirect from /[0-9]+/[0-9]+/[0-9]+/(.*)/ to /$1/ under Tools -> Safe Redirect Manager.

Edit Redirect Rules with Safe Redirect Manager

This will redirect a post like /2015/01/21/my-blog-entry/ to /my-blog-entry/ Over time, search engines will update their links to the new URLs. Until then, your WordPress site will be reachable via the old links.

Über uns Stefan

Polyglot Clean Code Developer

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax