Permalinks
When a blog has been running for some time there will be people who have deep linked your various posts and pages. The search engines will have done the same. When you move to WordPress you don’t want all these links to stop working and for your site to disappear out of the search engine indexes.
To fix this you will need to redirect the other URLs from the old syntax across to the new syntax.
A good tool to help with problem page redirects is the following:
http://wordpress.org/extend/plugins/redirection/
This needs to be configured to handle the different types of page:
- Search
- Categories
- Posts
- Archives
The following configuration is based on are based on the following initial work of Voyagerfan5761 and the article how-i-beat-blogger-and-redirected-to-wordpress
I created a group called “Blogger” so I can see my links separately from any others I might setup. I did this as a WordPress redirect but I don’t see any reason why it could not be done as an apache redirection using the .htaccess. I added the mobile redirect and feed redirects based on 404 errors I saw in the log shortly after migrating. I also added some manual links for the 3 pages I had on blogger.
Setup these links below before importing the links at the bottom.
The final thing is to redirect those links where the blogger permalink is different from the WordPress link. Luckily when you use the blogger importer it stores the blogger permalink in the wp_postmeta table so we can extract this information to make some new redirections. This can be done with some help from phpmyadmin.
For these pages we are going to script a series of redirects similar to this.
Login to PHPMyAdmin and select your wordpress database. Run the following SQL.
SELECT CONCAT(‘/([0-9]{4})/([0-9]{1,2})/’,Replace(Right(meta_value,INSTR(Reverse(meta_value),’/’)-1),’.html’,”),’\.html(\?.+)?$’) AS Source,Concat(‘/$1/$2/’,p.Post_Name,’/$3′) as Dest
FROM wp_postmeta AS m
INNER JOIN wp_posts AS p ON m.post_id = p.id
WHERE meta_key = ‘blogger_permalink’
AND meta_value <> ” and post_status = ‘publish’
and Replace(Right(meta_value,INSTR(Reverse(meta_value),’/’)-1),’.html’,”) <> p.post_name
This will produce results with two columns which can be exported as a CSV file. You then import this file into redirection to handle all of those links. The import screen can be found on the “Options” page of the redirection plugin.
My site was on a custom domain so I don’t need to configure the blogspot URLs to redirect across to the new site. However if you do have a blogspot url then you might want to concider putting in a modified template that redirects each of the pages over to the new domain.