WordPress vs. Jekyll: Why You Might Want to Switch
I’ve been using WordPress for the last eight years or so and, along the way, it’s been a good companion. But it’s far from perfect. Over the last four years, while running a high-traffic blog about video games, I struggled with a range of problems, like:
- My blog loading slowly.
- My blog crashing during peak periods.
- My blog becoming infected with malware.
It’s not like I didn’t prepare for these things. I installed W3 Total Cache, setup a content delivery network, upgraded the hosting, installed a number of security plugins, and did all of the “best practices” stuff.
Did these things help? Sure, but it was never enough, so when I shut down the site and no longer needed one of WordPress’ biggest advantages – being able to publish content quickly – I decided to look elsewhere.
Jekyll, I discovered, was exactly what I needed.
Introducing, Jekyll
Jekyll is a static blog generator. This means, instead of installing server-side software that’s built with a language like PHP, you use the command line on your local computer to generate static files (HTML, CSS, etc).
These files are generated based on:
- A configuration file.
- Any templates you want to define.
- Markdown files for blog posts.
You then upload the generated files to any web server and, well, that’s your blog. While this might simply sound like a geeky alternative to WordPress, this static approach has a range of real-word advantages over WordPress.
Let’s talk about them.
1. WordPress is overkill.
These days, WordPress is basically a content management framework. It can do just about everything and, if that’s what you’re looking for, then stick with it. I haven’t got a vendetta against WordPress. It’s great software. It’s just evolved beyond its roots and beyond what I (and many other people) need.
Jekyll, by comparison, is just a blogging platform. To some, this focus will be limiting, but if you only want to run a blog, then:
- Jekyll has everything you need and nothing that you don’t. You won’t be bogged down in options and insignifcant choices, but you also won’t lack the features you need most.
- The writing experience is unparalleled. Because your content is built with Markdown files, you can use whatever text editor you prefer. Personally, I use Sublime Text, but any other option is fine. Your preference wins.
- There’s less chance of anything breaking. This is partly because of Jekyll’s small scope allowing for a considerable amount of polish, but also because you’re not dealing with finnicky server-side software.
The “best” tool will always depend on the context but, increasingly, I think a simpler platform like Jekyll is worthy of being considered first.
2. WordPress struggles under heavy load.
A few months after launching my blog, a traffic surge saw hundreds of people browsing my blog at the same time. This was it, I thought. My hard work is paying off. Then the blog crashed, and it remained crashed for the next few hours, so what should have been a big day for the blog turned into a ball of stress that made me look like an amateur.
Of course, WordPress isn’t the only server-side application that’ll have trouble when it receives a large amount of traffic, but there’s more than a few stories of WordPress blogs crashing at precisely the wrong time – even with all of the proper optimizations – and there’s nothing sillier than worrying about your blog becoming too popular.
By switching to Jekyll though, this risk is non-existent:
- The loading of static files places a tiny amount of load on a server. The amount of load is almost impercetible. You’d have to try hard (or have a really lousy web host) to make your blog crash.
- You can host your website on Amazon S3. This makes it near-impossible for your blog to crash since the resources will automatically scale as you use them. There are few better sources of peace of mind.
Maybe your blog has never been popular enough to crash from high traffic but, I can assure you, it’s a terrible feeling to put months of work into a blog, only for it to crumble when it gets the attention you’ve been looking for. Preparing for your big day, then, is a very worthwhile investment.
3. WordPress is slow.
For the same reasons that WordPress struggles under load, WordPress is slow: it relies on dynamic code and database calls. You can make a WordPress blog load fast, but it’s like trying to optimize the speed of a tortoise. You’re just not starting from the right base.
Optimizing a Jekyll blog, on the other hand, is easy, since you can:
- Host your entire blog on a server running nginx.
- Minify your HTML and CSS without using a server-side plugin.
- Avoid over-complicated caching plugins altogether.
- Regularly run all of your images through ImageOptim (which I’ve found a lot better than using the SmushIt! plugin).
- Have much more direct control over the design of your blog. (WordPress has good support for theming, but Jekyll is less fiddly to get started with.)
But even without optimizations, the fact that Jekyll blogs are made of static files is enough to make them load faster than most WordPress blogs. It’s just that, if you go the extra mile, your blogs can load insanely fast. (My blog loads in under a second for most people, and I could take it further.)
4. WordPress is a growing target for hackers.
The more popular a piece of software it becomes, the more it becomes a target for the unfriendly sort of hacker. Does that mean your WordPress install is a ticking time-bomb and that someone will inevitably mess with it? Nope.
In the last eight years, I can only recall one breach where someone installed malware on my blog when I was a little behind on updating. So considering how easy it is to update WordPres and how many security plugins are now available, it’s not hard to grasp a solid amount of peace of mind.
That said:
- Having “lots” of peace of mind is not the same as having total peace of mind, and as someone who’s dealt with intrusions outside of WordPress, it’s a painful enough process that I’d rather avoid it entirely if I could.
- Security is not just the ability to protect from attacks, but also having the ability to quickly recover from anything that might go wrong.
The advantage of Jekyll is that, on the server, there’s only static files. There’s nothing dynamic that can be exploited. Are there other ways a hacker could break into your site? Sure. But only through the ever-present threats, like someone getting the username and password for your server. There’s no risk of a hacker breaking in through an exploit in a poorly written plugin or through a problem within Jekyll itself.
If an attack does occur, or if there’s “just” some data loss for some other reason, then the recovery process couldn’t be simpler:
- Regenerate the blog on your local machine.
- Upload it again to the server.
If you need a new server, then so be it. There’s nothing “heavy” to move like a database, or anything special to install. Just pay for a new server, upload the files to it, and that’s it. You’re back in action.
In terms of local data loss, it’s another non-issue. Store your Jekyll blog inside your Dropbox folder and it’ll be backed up continually. Throw in a tool like Arq (with Glacier) and your blog’s data will be safer than it probably is at the moment. The cost will also be negligible since static files are so tiny (while still being easy to store them for long durations of time).
5. WordPress hosting is expensive.
The catch-all solution for the problems I’ve covered so far is to pay more for web hosting. There are even hosting services like Synthesis that are precisely dedicated to solving these problems and can bring a satisfying level of peace of mind.
But these services come at a cost. Some will argue that “you have to spend money to make money” but that doesn’t always make sense. The struggle with my video game blog, for example, is that the margins were so low. If I spent extra on hosting, it would have been a significant chunk of the revenue. Maybe that’s a sign that something is wrong with the business model itself, but I was running the business how I wanted to run it and the costs were associated with my use of WordPress, rather than being an inherent factor in running the blog.
By avoiding these WordPress hosts, and by optimizing the hell out of my blog, I was able to sneak away with a bill of about $60 a month, but the blog would still crash under the (mostly) unpredictable traffic bursts.
Compare this to my new, static blog. I could receive 10,000 visitors in the next hour and it wouldn’t flinch, and yet it only costs $5 per month to host on a Digital Ocean droplet (with nginx installed).
To slice costs even further though, host your blog on Amazon S3. Not only will it scale without limits no matter how much traffic you receive, most people will spend only a couple of bucks for hosting. (The advantage of Digital Ocean is the speed, which is why I fork out the tiny bit of extra money.)
Conclusion
There’s a lot to love about WordPress and, if you find yourself thinking, “But the trade-off isn’t worth it…” in response to any of these points, then you’re probably right, and you should keep using WordPress.
I don’t want to push people onto Jekyll for the sake of it. However, I believe that a lot of bloggers (and a lot of blog readers) stand to gain from switching away from a dynamic blog, so it’s at least worth your consideration.