Switching from Wordpress to Jekyll

2 December 2012

Incumbant: Wordpress

I have used Wordpress to manage this personal website for the past two years. Since September, WPEngine has been my host of choice. The system performed excellently, and it consistently handled traffic spikes with quick load times, as I detailed here.

However, I have been on a discounted trial of WPEngine, so cost has not been an issue. With the trial concluding, I sought a new host becuase the convenience afforded by the service does not justify its full cost.

Enter Jekyll

A recent article about the technology behind the Obama fundraising campaign piqued my interest. Their network used Jekyll-generated static pages hosted on the Akamai CDN to accept $250 million in campaign donations. Wordpress caching plugins essentially aim to serve the site with static pages, so the idea of generating static pages locally using Ruby then serving a purely static site made logical sense.

Jekyll, however, is not an automated content management system - it requires basic familiarity with Ruby, HTML, and CSS. The technical granularity coupled with the ability to version-control the website with Git appealed to me.

Using a CDN to purely serve a website intrigued me most becuase of the potential for extremely fast speeds with near-infinite scalability. Putting my personal website on Akamai would be like strapping a Kestrel rocket on the back of my Civic.

Switch

The full code for my website is availabile on Github here. Learning Jekyll and using its plugins proved quite trivial.

The tedious part of the shift was redirecting the permalinks from my Wordpress site to the Jekyll site. My previous website was based on the naked domain, whereas using a CDN requires a subdomain (for a CNAME record). Thus, I had to switch both permalink structure and domain. I did this manually with 301 directs in .htaccess served by Heroku. That file is here. After putting the redirects online, I then manually submitted a crawl request through Google for each old page. This process, though tedious, preserves inbound links and SEO.

Rackspace offers access to the Akamai CDN through Cloud Files. Using Akamai with Jekyll required much tinkering because the platform was not designed to serve a full website. After many calls to Rackspace's truly fanatical support team, I was able to overcome all issues, including caching limitations. I have decided to provide a full guide to interfacing Jekyll with Akamai in a separate forthcoming blogpost in order to cover all of these idiosyncracies in sufficient deal.

Results

With WPEngine, I consistently clocked page load times under two seconds. With this Jekyll implementation, load times closer to 300ms have been average, with the occassional sub-100ms reading, as shown above (via Pingdom). While these speeds are outrageous, it is exciting to realize that, with Akamai as a host, this speed is essentially independent of scale, and the network can accomadate nearly any traffic level I could expect.

Of note, though, these page load speeds are so excellent because the site is static content. Making a website scale at these speeds with database queries and sessions would be much more difficult.