0

I have a Wordpress site with a /%year%/%monthnum%/%day%/%postname%/ permalink structure, and now the client wants it changed to /%category%/%postname%/.

How do I do a generic redirect for the old permalink structure to the new structure?

I checked out https://yoast.com/wp-content/permalink-helper.php, but it creates redirect code for /%year%/%monthnum%/%day%/%postname%/ to /%postname%/, instead of to /%category%/%postname%/

2
  • That's because it can't be done since old URL do not have sufficient information to create htaccess redirect with category. You will have to so this within wordpress. – Robert hue Sep 2 '14 at 6:43
  • There is redirection plugin. wordpress.org/plugins/redirection and if you prefer not to use plugin then use WordPress function redirect_guess_404_permalink which tries to guess correct URL of 404 error. It mostly works. – Robert hue Sep 2 '14 at 6:49
1

Don't need to do anything except change permalink.Just go to settings->permalink->Custom Structure and add '/%category%/%postname%/' to text box. It will work same exactly what you want.

0

You dont need to install plugins to do this. Go to Settings-->Permalinks-->Custom Structure--> And now set this custom structure

www.example.com/%category%/%postname%/

It will do all the work of redirecting unless your htaccess has the write permissions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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