DotNetSurfers

Latish Sehgal's Blog

Migrating From Wordpress to Octopress

Over the last week, I have migrated this website from Wordpress to Octopress. Wordpress has served me well over the last year, but it was starting to feel bloated and an overkill for my requirements. I really like the simplicity of Octopress. The blog posts are written in Markdown and the final result is a static HTML site. I have also been spending some time learning Ruby, and this gave me a chance to become more familiar with the ecosystem.

Besides the information available on the Octopress website, here are the steps I had to take:

  1. Install Octopress.
  2. Download Exitwp and install its dependencies.
  3. Upgrade Wordpress install to version later than 3.1 to be compatible with Exitwp.
  4. Enable Disqus on Wordpress and export comments. Also, disqus was configured in the Octopress configuration.
  5. In Wordpress, under Tools->Export, generate an xml file for the website. Run Exitwp on this file to generate the posts in Markdown.
  6. The comments are turned off in these posts. I ran the following script (found in comments here) in terminal to turn comments on:
     for I in *.markdown; do sed -i '' -e ':a' -e 'N' -e '$!ba' -e 's/\n---\n/\
     comments: true\
     ---\
     /' "$I"; 
    
  7. Generate aliases for posts/pages if you want to maintain your old urls by adding the Jekyll Alias Generator plugin.
  8. Deploy to heroku.
  9. Point domain to heroku.

Comments