Finally made the move from Wordpress to Octopress.
Why leave Wordpress?
I’m finding it hard to identify specifically what was so unsatisfying about Wordpress.
Maybe it was fighting through a GUI. Maybe it was dealing with so many upgrades to WP core and to plugins. Maybe it was having the blog content reside in a database rather than in a Git repo.
Ultimately, I just found myself with a feeling of dread every time I had to plunge back into Wordpress to tweak something or even just to write a fairly text-ish post.
The net result was that I hardly blogged at all.
I’d been looking at Jekyll for a long time, since a lot of the cool kids seem to be using it.
More objectively, Jekyll would offer me the following benefits:
- Write posts in markdown.
- No more GUI.
- No more DB.
- Content is more easily managed in a Git repo.
- Static site loads fast and deploys easily.
- Learn some new stuff.
But I really couldn’t get my head all the way around how it all works.
Then someone – I really can’t remember who. Seriously. If it was you and you know who you are, please remind me so I can credit you – pointed me to Octopress which I view as a Jekyll wrapper. That wrapping and the accompanying docs closed the gap enough so I could get it.
The bottom line was that it just seems easier to manage the blog using the familiar tools that I use every day: SublimeText, Git, and a few CLI commands.
Overall, the Octopress docs are quite good and pretty clearly describe the steps.
But since a migration from WP involves a few more considerations than just starting a new blog, there are a few additional steps. The post Migrating from Wordpress to Octopress from Jason McCreary was very helpful.
For reference, my host OS is Ubuntu 12.04.
Setup Ruby environment. I used rvm to get the required v1.9.3. Fought with a bit of
~/.bash_profilestuff, but emerged victorious.
Git ready to rumble. After doing the core install according to the Octopress docs, including a
git cloneof the Octopress repo, I blasted my
.gitfolder since I don’t want the entire Octopress history as my blog history. Then I did a
git initto start with a fresh repo, did
git remote add originpointing to my own remote Bitbucket repo. Then
git commit, and
git push originto get me up and running.
I did add the main Octopress repo as a remote called
upstreamin the suspicion that it will allow me to pull upgrades from them, but I confess that I haven’t yet fully thought through all that. Perhaps a future post can describe that process.
Note that all of this Git stuff is not strictly necessary to use Octopress. But being able to manage my blog primarily with Git was one of my primary goals.
Export posts, pages, and blog metadata. The Export To Jekyll plugin recommended by Jason made it a piece of cake. Once I had that data, I just had to drop it all (except the
_config.ymlfile) into the Octopress
sourcedirectory. I transferred the values from the exported
_config.ymlinto the main Octopress
_config.ymland discarded the export version.
Export comments. Per the Wordpress export page on the Disqus site, I just exported the entire site to WXR format (
WP > Admin > Tools > Export]) and then imported the WXR file into my Disqus account. It took a few hours for Disqus to chew through it all – even though it was pretty small – but it’s not like I had any shortage of other things to do. ;–)
Setup permalinks. In order for Disqus to associate the imported comments to your Octopress posts, the Octopress urls and for all posts and pages need to the same as they were on the WP site . In
_config.yml, set the permalink structure to match what you had in WP.
Generate your shiny new static blog using
rake generate. View your blog home page at
public/index.html. I setup a local virtual host called
papayasoft.localmapped to the
Tweak. Enabled/configured plugins. Found/corrected errors in old posts. Added a few custom
asidesand just generally figured how stuff works.
Deploy. I deployed using
rsync. The Octopress deployment docs were right on.
The result is the creature at which you are right now gazing – admiringly or otherwise.
Still a bunch of stuff to do including:
Get a better theme. There’s nothing inherently wrong with the default theme. It’s just that by virtue of being the default, it’s pretty common. It’s also a little plain. I’d like to find something with at least a splash of color, like this one.
Replace a missing page or two.
Most of all, start blogging again!