0

Could you help me with the following predicament? I'd like to change the permalink structure of my website from the current one

/%category%/%postname%/

to

/%category%/%post_id%/

in a way so that the old publications could still be reachable through the old links?

Thank you in advance!

2 Answers 2

0

First, you need to 100% sure you want to make this change to your site because it will probably have an impact on your SEO, positive or negative.

Once you change your permalinks have been changed your WordPress installation will update all the links itself, however, links in the menu or any hardcoded links you will need to change yourself.

But to answer your question, you are best using 301 Redirects allowing anybody who happens to stumble across an old link make it to the correct page / post. There is a plugin that can achieve this called Simple 301 Redirects. The authors of this plugin note:

It's especially handy when you migrate a site to WordPress and can't preserve your URL structure.

This is a fair case for 301 Redirects. However, with Search Engines this is beyond your control unfortunatly. You will need to resubmit your XML site map.

2
  • Hello ham-sandwich and thank you for your extensive answer! I tried both Simple 301 Redirects and Redirection. However, I was looking for something more in the lines of an htaccess redirect, something more automatic. I found a redirect generator, but it's only good if the new structure is simply the postname: yoast.com/wp-content/permalink-helper.php Is there a way to adjust it to my scheme?
    – zkvvoob
    Sep 21, 2014 at 20:28
  • @zkvvoob you could always try a hack to accept both permalinks and create master and slave urls. However, I cringe as I write this and don't recommend it. Sep 21, 2014 at 20:33
0

you will need a redirect in your .htaccess @fuxia takes all the credit

RedirectMatch permanent ^/\d\d\d\d/\d+/\d+/(.*) /$1

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.