Inspired? No home

Migrate from Blogspot at Blogger to Wordpress at custom domain

I have been using Blogger and hosted my blog at Blogspot since I started blogging almost five years ago. As I signed up to get a virtual server at the excellent Slicehost last month I have now moved my blog to be hosted at my domain inspired.no and will now be using Wordpress. In this process I naturally had to migrate my Blogger blog to Wordpress and redirect my Blogspot to my domain:

  1. Export from Blogger to Wordpress.

  2. Redirect visitors from Blogspot to new domain.

Content migration is very easy with the excellent import tool in Wordpress. Just authorize the request in Wordpress in your Blogger account and Wordpress will automatically import all posts and comments. Works perfect. Only two minor things to change: Internal links and your own posted comments.

Update all internal links:

Connect to your database in MySQL.

See if you have any internal links directly pointing to your blogspot blogĀ (change the blogspot url to match yours):

select 
ID, post_title, replace( post_content, 
'href="http://sleepyhead81.blogspot.com/', 'href="/') 
from wp_posts where post_content like '%sleepyhead81.blogspot%';

If anything needs to be changed then do the update (change the blogspot url to match yours):

update wp_posts set 
post_content = replace( post_content, 
'href="http://sleepyhead81.blogspot.com/', 'href="/') 
where post_content like '%sleepyhead81.blogspot%';

Update your own post to be linked to your new user in Wordpress:

update wp_comments set 
user_id = 1, comment_author_email = 'your@email.com' 
where comment_author = 'Comment name in Blogger';

That was easy. Now to the painful part. Read part 2 about redirect from blogspot.

Written on 28 December 2008.
blog comments powered by Disqus