2 min read

Moving from WordPress to Octopress

No database was used in the creation of this post.

Back in 1998, I only wrote static HTML files. I had not yet learned PHP and MySQL, so my sites consisted of three things: text, pictures, and links.

The web changed. Content management systems opened up web publishing to the masses. WordPress took over the world, and no longer did you need to know HTML or FTP to speak to the world.

But as WordPress added more features, plugins and themes, it became less suited for it’s original purpose: publishing a simple blog.

I’ve built many sites in WordPress. It’s great for delivering low-cost brochureware that the client can update on their own after the handoff. But the more I build Rails apps and work in Sublime Text 2 - a text editor built for lean speed - the more frustrated I get with WordPress’ browser based editor, obfuscated code base, and slow page loads.

The page you are now reading is a static file - straight HTML. When your browser requested it, no language interpreted variables, and no database was called. I authored the content in Sublime using Markdown, which was converted one-time into HTML, and then I deployed it via git to Heroku.

This is made possible by Octopress, a Ruby based blog platform for developers. It is built on top of Jekyll which converts Markdown to static websites. Because it scales so well, Jekyll powered the websites of the 2012 Obama campaign.

Octopress is not a WordPress killer. It’s built for a single purpose, and for a specific user. Unless you are comfortable with git, a text editor, and a terminal, you’re not going to jive with Octopress. But for now, it seems the most efficient way for a Ruby developer to compose and serve blog posts.

If you decide to migrate from WordPress to Octopress, here are a few things to keep in mind:

  • exitwp is the best way to export data from WordPress to Octopress. It will even download all of your images to a local directory, though you will have to adjust the img tags yourself. You may need to install Python 2.7.3 to run exitwp.
  • Heroku doesn’t run Apache, so setting up 301 redirects in .htaccess will not work. Instead, use the rack-rewrite gem to redirect old urls from within your Octopress app.
  • Though they are not as plentiful as WordPress, there are some good lookin’ themes for Octopress out there. This site runs BlogTheme by Aron Cedercrantz.