loading words...

Feb 15, 2019 13:15:58

Migrating Off WordPress

by @valentino | 720 words | 35🔥 | 333💌

Valentino Urbano

Current day streak: 35🔥
Total posts: 333💌
Total words: 161205 (644 pages 📄)

Notice: I've migrated my blog off WordPress and into Jekyll a few years ago, but I never wrote much about it. Many of the choices I took would be different if I was going to do the same thing nowadays (mainly which frameworks I would choose).

This is going to be a series on how I migrated my personal website off Wordpress and what you need to do if you want to embark in the same journey.

I had been thinking about doing it for almost 5 years before actually going through with it. I had always been scared of totally breaking the website by migrating it off something well estabilished as WordPress and that I'd been using for years at that point to something less "mainstream". My process looked something like this: I would write each post in markdown in Byword (both on iOS and Mac OSX), convert it to HTML and paste it manually into the WordPress textbox. Doing all of this each time felt a bit too much friction. It wasn't broke, but it surely could have been improved.

Early on I decided that I would want to go for a static site. The content of the site would not change much and it surely wasn't dynamic. I could easily rebuild all the static pages when I published an article.

Static Website using Markdown - What are the options?

Since I've been interested in doing this for years, I've read about and tried locally many markdown static website generators.

This is a comprehensive list of everything I've tried:

- Jekyll - The standard that started the whole movement of static markdown websites.

- Octopress - Opinionated customization of Jekyll built for blogging.

- Second Crack - A hobby project of a developer I follow. It works well, but it should not be used for production use since it doesn't really have a community behind it.

- Hugo - Really fast builds, but lacks plugins and extensibility.

- Ghost - Great look out of the box, needs a VPS.

- Brunch

- Hexo

- Gatsby - Based on React. Great if you're already using React on other project or if you'd like to learn it.

- Gitbook - Super simple to set up and use, but limited in extensibility and customization. Great for documentation, books, and tutorials.

I'm sure I missed many of them, but I feel like these ones are the most used and/or famous. Of all of these, I particularly liked Gatsby, Jekyll, and Ghost.

A few of these solutions (Ghost and Second Crack for example) need either a VPS to build the website or a manual deployment process where you built the website yourself and deploy the generated website to your server.

Nowadays you can use Netlify to automatically run a "cloud function" after each deploy to generate your website and deploy it so it's less of a hassle, but it still not straightforward to setup. I've tried Netlify with both Jekyll and Gatsby and it works well.

Why I chose Jekyll

In the end, I chose Jekyll over Gatsby and Ghost for multiple reasons:

1. Community

It's the framework with wider adoption, a history of consistent updates over a decade (it was launched in 2008) and most activity on Github. It might be that in the future newer frameworks will overtake it and if that's the case it might be worth migrating, but for now Jekyll is still the king.

2. Automatic integration with Github

Github Pages runs on Jekyll with almost no setup. I could simply host my website there and have all the goodies of Github included for free. Otherwise would have been forced to use two different services instead of one: Github to host the code and Netlify to host the site. I tend to avoid that whenever possible.

3. Longevity

It being old might be seen as a negative point of some people, and in some cases of bloated and old software it is, but I don't think this is the case. The framework is very much alive and used by most static websites, not to forget that just the fact of Github officially supporting it means a lot more people using it and more people contributing code and fixes. I know it is unlikely that any of the other 2 frameworks I was considering (Ghost and Gatsby) are going to shut down any time soon since they're both widely used.

  • 1

    @valentino great post. I am in the process of migrating to a flat file cms - picocms and typemill the current candidates. Was looking for a simpler option- jeykill did cross paths but that might be for a later day. Good luck with your migration! (added later: Datenstrom.se also works quite well! - and yes, maybe I prefer the lesser known names)

    Amar Vyas avatar Amar Vyas | Feb 15, 2019 21:16:37
    • 1

      @amarvyas Never heard of them, will take a look.

      Valentino Urbano avatar Valentino Urbano | Feb 16, 2019 00:09:06
contact: email - twitter / Terms / Privacy