0

I want to change the permalinks from /%postname%.html to the default ?p=%post_id% permalink. I know how to change the permalink structure that from WordPress admin panel.

However, I have over 30000 posts and I want to make sure that people who visit the old URLs will be redirected to the new.

For example:

http://example.com/sample-post.html would redirect to http://example.com/?p=123

1 Answer 1

0

You can do this in the Wordpress Admin panel. Navigate to Settings > Permalinks and choose "Default." This will reset your link structure to default. After saving, you should clear your cache and it should work. However, this will not change your html pages or any other links that is hard coded into the template files.

Your post pages and any other pages in WordPress is PHP driven but for some reason you this is not the case for you, you could try using the "Custom Structure" option and paste this code in: /%post_id%.html

1
  • That doesn’t solve the redirection problem.
    – fuxia
    Commented Dec 26, 2013 at 3:50

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.