Safely Migrating Permalinks [WordPress]


WordPress LogoChanging Permalink Structure is not as easy as it looks. Simply changing the value in Settings->Permalinks will leave your Search Engine indexed pages/links with a 404/Not-Found error. Thus you may risk losing your valuable visitors, and your posts with the new permalink structure will not have the old Page Rank (PR). Here’s a tutorial that will help migrating permalinks without losing traffic nor Page Rank.

In order to safely migrate/change Permalinks, a 301/302 Redirection should be enabled for the old Permalink, so that your visitors who visit the page through the old permalink structure will be safely redirected to the new permalink structure, and your Page Rank will also remain unaffected. To impose a 301 redirection, few lines of code have to be added/appended to the .htaccess file. To make all these tasks simpler and easier, there’s Dean’s Permalink Migration Plugin. This plugin generates a “301 Redirect”, also known as a Permanent Redirection. So when a user visits your site through the old permalinks, they will be redirected to the new permalink structure of the same post.

The Plugin can be downloaded from WordPress Extend Repository here. Once downloaded, unpack the archive and upload the PHP file to /plugins directory of your WordPress. Login to your WordPress backend and enable the plugin. Once enabled, you should be noticing a link named ‘PermalinksMigration’ under Settings in the left pane. Your current Permalink structure will be displayed in the ‘Old Permalink Structure’ text-box. You don’t have to edit this value.

dean-permalink-migration

Next, click ‘Permalinks’ under Settings in the left pane and enter your new Permalink Structure, say /%postname%/.

wordpress-permalink

Done! You’ve successfully changed your Permalinks Structure. Vistors/Spiders that visit your site through the old Permalink Structure will automatically be redirected the new Permalink Structure.

Tips

  • Default permalink structures like /2009/09/21/sample-post/, /2009/09/sample-post/ and /archives/123 are not suggested to be good for SEO.
  • Category permalinks like /category/sample-post/ are good only if posts belong to a single category, else it may create post duplication
  • /postname/ is the most suggested permalink structure.

You may also want to visit WordPress’ Manual on Using Permalinks here.