Transitioning from Wordpress to Jekyll

2 minute read

After many years of Wordpress, I’ve decided to transition the website from One Day Website’s Wordpress to Jekyll. There were a few main reasons for the transition. In order:


Wordpress is a great platform for low traffic websites, as well as a low barrier to entry those who want a blog or website that are new (or lazy) to websites. As this blog has been around for a while, I’m now averaging 8k-20k hits a day on average, and when I post an article, that often spikes to 50k-100k in a day. When using Wordpress, that is auto-generating each web page (OK I now have a few tiers of caching to handle the traffic) to the user using a dynamic programming language called php. By moving to Jekyll, the webpages as you see them are now static, not auto-generated. This means they are less resource intensive to generate, and lot faster for you to read them.


On top of being a lot faster, one of the risks with Wordpress is it’s using php to access a database, and that is a sweet attack vector for hackers. By moving to static webpages, there is no programming language to attack, and no database to hack. I don’t have to patch or update anything any longer, with static web pages.


As I spent most of my time on the business side instead of the technology side these days professionally, it’s been fun to learn something new and geek out a bit. For example, if you ever make the transition from Wordpress to Jekyll and the minimal mistakes theme, these regexp’s will likely come in handy for your posts to clean up the front matter:

$ cd _posts
$ sed -i '/type:/,/status:/d' *.html
$ sed -i '/meta:/,/last_name:/d' *.html
$ sed -i '/wp:/d' *.html
$ sed -i '/tags: \[\]/d' *.html

and a few other tips:

# move images to assets/images/ and then
$ egrep '(jpg|jpeg|gif|png)' *.html | find ./ -type f -exec sed -i 's/\/assets\//\/assets\/images\//g' {} \;
# minimal-mistakes uses single instead of post for layout
$ find ./ -type f -exec sed -i 's/layout: post/layout: single/g' {} \;

If you want to get started and have a unix-based shell:

$ jekyll new $
$ cd $
#  $ jekyll serve # to test it
# add 
gem "minimal-mistakes-jekyll"
#to Gemfile. Install the theme
$ bundle install
# add it to _config.yml: 
theme: minimal-mistakes-jekyll
$ bundle exec jekyll serve

Anyway, if you’re reading this, I hope you like the new website! I’m also going to put this site onto github for easier management and revision control – next step will be find an easy way to have git push also do an rsync of any changes to _site with an ssh public key.

Leave a comment