Fixing the Wordpress Permalinks Migration Plugin

2008 Oct 22 at 23:26 » Tagged as :wordpress, python,

The other day, I changed the wordpress permalinks structure on my photo blog. Once you make the change, incoming links on other sites, google search and even internal links will result in 404 errors because wordpress will no longer map your old permalinks to individual posts. You can fix it by using Dean Lee's permalink migration plugin.

That takes care of single posts but unfortunately the plugin doesn't work with monthly archives. In my photo blog, the permalink format was 'numeric' (/archives/%post_id%) which results in the montly archives looking like this: http://photos.raditha.com/archives/date/2008/01 . Under the new 'postname' scheme that I adopted ( /archives/%postname%/ ) the link becomes http://photos.raditha.com/archives/2008/01 - idealy Dean's plugin should redirect the old archives page to the new one but it doesn't happen. However if you do click on the links above you will find that the redirection does indeed work. That's only because I have changed my .htaccess file to rewrite them. The .htaccess file now looks like this: