Switching from Wordpress to Ghost

Over the holidays, I started the process of moving my blog from a self-hosted Wordpress site to a nice, shiny new Ghost one. Having finally wrapped up the process this weekend, I thought I'd jot down a couple of my motivations, and a few things I learned along the way.
The Why
There were two main factors driving me away from wordpress:
- Native Markdown support
- The fact that Ghost is written in node.js
I know that you can do things like install WP-Markdown to get basic MD support inside Wordpress. I tried it, and it worked OK. However, the conversion from MD to HTML to be stored in the database, and back to MD for editing, was prone to problems. The slightest modification to the auto-generated HTML would result in a super-messy mix of MD and HTML for me to edit.
And there was always the threat of that mess, at least for me: I was unable to force myself to ignore that native HTML editor tab just offering itself up for me to solve some small layout problem. Now, in Ghost, with MD native to the platform, there is no way for me to "get to the raw html" and muck things up. (Of course, one can add html inline with the MD, and I've taken that route a few times, which is not always ideal.)
Of more importance to me, though, is the fact that Ghost is written in node.js. A lot of smart folks have raised a lot of concerns with node recently, but for my needs, I've loved every second that I've been working with it. So the option to hack on my blog in node, instead of PHP, was really enticing.
Which leads to a kind of third, side benefit: the fact that Ghost is so young, there's a lot of really interesting work to be done on it, both for the developers of the Ghost blog itself, and for folks like me looking to implement it.
The Where
The path of very least resistance to getting a Ghost blog up and running is to sign up for their Ghost Pro hosted service. They handle everything, and you can bet they'll be good at what they do.
Since I anticipated hacking on the default ghost install, I wanted to go the self-hosted route. There aren't a ton of "out of the box" solutions out there yet, but Digital Ocean seems to be the provider that's getting the most mindshare right now. You set up a ghost-configured droplet with them, and you're off and running.
With a lot of local pride, I went instead with A Small Orange from right here in in lovely Durham, NC. After signing up for their mid-range shared plan, you can install Ghost right from the CPanel.
The How
Once I got Ghost installed, there were a few things I had to figure out to get it running smoothly, and restore most of the features I left behind on Wordpress.
Restarting
On an A Small Orange (ASO) Ghost installation at least, to restart your blog, simply touch a file called "restart.txt" in the /tmp
directory of your ghost root. Restarting is a pretty frequent requirement for Ghost, though I expect this to be needed less as the platform matures.
Themes

Theming for Ghost is tackled by a relatively small group of folks, at least compared to platforms like Wordpress. The largest collection of up-to-date and attractive themes I've found are at Theme Forest. Look for 0.5.x version support. In fact, look for a theme that appears to have been updated in the last month or so. This is actually pretty important, as the feature set for Ghost is enhanced with almost every version.
If you just love a theme that is a little older and behind the times, that's fine. Just be ready to dig in and update it for the new Ghost features. (That's what I did, and will be detailing in another post.)
Comments
At the present time, the developers of Ghost have no plans to support comments. Their vision for Ghost is that of a simple, basic blogging platform for writers. Comments don't fit in to that vision. My guess is that, over time, feature creep will lead the devs to include this (and other) features, but for now, a third party solution is required.
The go-to solution is Disqus. Most recent themes have support for Disqus built right in, though if yours doesn't, don't worry. It's really easy to add. Getting Disqus itself set up is also really straight forward, with the folks at Disqus offering a simple guide.
Related Posts
Another feature that I enjoyed on my old blog is related posts. That is, an automatically-generated list of posts on your blog that are similar in content or area of interest to the current post. In fact, in the week or so since I initially migrated this blog, and didn't have any kind of related post functionality set up, my bounce rate increased by almost 25%.
There's a "plugin" (official plugin support for Ghost is forthcoming, so anything called a plugin right now is a hack) called Ghost Related that parses your sites RSS feed, and looks for posts with the same tags as those on the current post.
I wanted something a little more robust, so I went with Outbrain, a third party solution that will help you get your content discovered. Amongst their many paid services (like syndicating your content across affiliate sites) is the free "related posts" service that Outbrain kindly offers. I've got it up and running on my site, and while the results are a little different than what I'd expect, they seem pretty good.
Analytics

One neat little trick I picked up was how to ignore a logged-in user, such that her browsing of the site won't pollute the analytics results. Looking at the ghost:session local variable, one can skip the analytics if the user is logged in. After putting a hacky if statement around my analytics code, I came across this much nicer implementation (last post in thread):
var sessionKey = "ghost:session";
function getLocalStorage(key) {
var item = localStorage.getItem(key);
return item ? JSON.parse(item) : false;
}
function isAuthenticated() {
var ghostSession = getLocalStorage(sessionKey);
return ghostSession && new Date < new Date(ghostSession.expires_at);
}
Wrap Up
So far, I'm really enjoying my experience with Ghost. As heavy and cumbersome as WP felt, Ghost feels light and nimble. I'm excited to see where the devs take it, and I'm excited for plugin support, so folks can start doing their own neat things with it.
Comments ()