Joe Poon

Iterative Thoughts on Software

Archive for the ‘Hosting’ tag

From Blogger to WordPress, without breaking the Internet

with one comment

Blogger
I’ve used Blogger since 2005 and it has served me exceptionally well, not to mention that it’s completely free.  My reasons for trying WordPress were simply the myriad of themes and plugins offered by the community.  Over the last week, I’ve moved my blog from Blogger, to WordPress.com, to WordPress running on a shared host.

WordPress.com
So, I first moved over to WordPress.com - a great free blogging platform.  The import utility worked like a charm and to keep the domain name as I had on Blogger (blog.joepoon.com), I purchased the domain mapping upgrade.  I then noticed ads on the bottom of my blog posts - the ads are unintrusive and understandable, as somebody needs to pay to keep the free service going.  Moreover, one can opt out of ads for a small upgrade fee.  Even though Blogger doesn’t charge for domain mapping nor does it place ads, optional upgrade fees for an otherwise free and managed WordPress.com blog is still a great deal.  However, this gave me the nudge to take the goodness of the WordPress engine and host it on a shared host.  I’ve been meaning to get my own host anyways, there will be more maintenance, but it will be a good exercise and allows for unlimited WordPress customizations.

Self-hosted WordPress
So, after a short few days on WordPress.com, I’ve moved to WordPress on HostGator.  So far, so good.  With the power of a shared host, I decided to move my blog from a subdomain blog.joepoon.com to a directory joepoon.com/blog (you cannot map to directories with Blogger and WordPress.com).  There is a whirlwind of discussion as to where you should install your blog - subdomain, blog directory or root.  Each alternative offers trade-offs in regards to theories about page rank, site organization, site uniformity and extensibility.  Right now, joepoon.com simply redirects to /blog, leaving the root for future considerations.  More importantly however, by changing my blog location, I’ve broken links.

To redirect blog.joepoon.com links to joepoon.com/blog, I added an .htaccess file in the subdomain folder.

  1. Redirect old Blogger links
    Blogger permalinks have the format: /%year%/%monthnum%/%postname%.html and exhibit the following behavior:

    • concatenates the postname to a maximum of 40 characters
    • absence of day number
    • suffixed with .html
    • excludes article words (the, as, a)

    Take the post name: 'a book titled the cat in the hat by an author named dr. seuss'

    Permalink in Blogger
    2009/03/book-titled-cat-in-hat-by-author-named.html

    Permalink in WordPress
    2009/03/31/a-book-titled-the-cat-in-the-hat-by-an-author-named-dr-seuss

    I’m using the day and name permalink setting in WordPress.  I could change it to use a custom format to append .html and exclude the day number, but the exclusion of article words and limit of 40 characters makes a direct mapping of Blogger permalinks to WordPress permalinks tricky to regex.   So, given the few posts I need to redirect, I manually redirect each link in the .htaccess file.

    # redirect the blogger feed
    RewriteRule ^feeds/posts/default$ http://joepoon.com/blog/feed/ [R=301,NC,L]
     
    # redirect the individual blogger posts
    RewriteRule ^2007/07/information-card-ruby-at-burton-group.html$ http://joepoon.com/blog/2007/07/05/information-card-ruby-at-burton-group-catalyst-conference [R=301,NC,L]
    # ... etc ...
  2. Redirect old WordPress.com links
    In the transition phase, I had my posts on WordPress.com. To my amazement, within those 3-days, the Google bots indexed my blog.  So, I redirect these links as well.  As the links on WordPress.com map directly to my self-hosted WordPress blog, a wildcard replacement will do the trick.  In retrospect, experimenting with WordPress on a local install or changing the privacy settings on WordPress.com to private may have been a good idea.

    RewriteRule ^/?(.*)$ http://joepoon.com/blog/$1 [R=301,NC,L]

    It’s useful to note that I had my Blogger and WordPress.com blogs mapped to my own subdomain.  This allowed me to setup the above server-side redirects.  If it was on the .blogspot or .wordpress domains, I imagine that I would have had to resort to meta redirects or utilize one of the Blogger to WordPress conversion plugins.

Whew, so after all that, I’m settling into my new home at joepoon.com and joepoon.com/blog.
Please update your links and let me know if I’ve broken anything.

Written by joe poon

April 2nd, 2009 at 10:24 am

Posted in Software

Tagged with , , ,