X

Moving Super Dev Resources blog back to WordPress from Jekyll

About a year ago, I switched most of my blogs to Jekyll from WordPress, including this one. Jekyll is one of the top static site generators and it was fun to work with as a developer.

Over the last year, I kept my blogs running on Jekyll and tried solving little bits of hurdles and plugging in the gaps between Jekyll and WordPress. You can find a few of articles on Jekyll that I wrote on this blog.

Why I moved back to WordPress?

Overall, I enjoy working with Jekyll and a few of my side projects are still made with Jekyll, however I have now made a choice to move back all my blogs to WordPress. The biggest reason for this move is that I was blogging less and was spending more time in making sites built with Jekyll behave like a WordPress site.

While, all the benefits of Jekyll over WordPress that I outlined in my earlier posts still hold, one thing that is still lacking is, WordPress is backed by a commercial entity having dedicated developers who are constantly evolving WordPress for the latest web standard and for the needs of commercial websites. Take for example: AMP (accelerated mobile pages) by Google. You will always find yourself at home with official or third-party plugins available for WordPress for such things (check AMP WordPress plugin by Automattic). While on the Jekyll side, if you need such support, you will mostly have to do it yourself.

The other problem, which I faced was with authoring posts on a multi-authored blog (Super Dev Resources) that I manage. While I was able to the fill the gaps (wasn’t a big deal) and make Jekyll produce sites which are multi-authored, forcing all my authors to have a Jekyll setup was a big task and introduced a big friction in the publishing process. The other way was to ask for post in markdown format from them and do the publishing myself using my Jekyll setup. But this proved to be an extra burden for me which resulted in lesser articles over the last year.

Since most of the authors (including guest authors) are already familiar with WordPress, it is much easier to have a blog running on WordPress to have content publishing running smoothly on your blog.

How I moved from Jekyll to WordPress?

Luckily, all my blogs were previously hosted on WordPress and I had made a backup for them before moving them to Jekyll. This made it much easier for me to restore a WordPress setup for them from the backup. The only big task was to import posts that were written while these blogs were on Jekyll.

While there is an official way for you to import your posts from WordPress to jekyll, there isn’t any for going the other way. You will have to write your own scripts to do this migration and depending on the structure of your Jekyll site this script can be customized for each one.

Since there weren’t many posts written over the last year on my blogs while they were on Jekyll, I decided to use WordPress import from RSS plugin.

I first tweaked the Jekyll site to produce an RSS containing all the posts that I needed to migrate. This RSS file was then imported using the plugin mentioned above. The plugin did a good task in importing the post content, its published date and the categories too. The only thing that were not imported were the images which were inside the post. Since the image paths in these new posts were not as per WordPress default (i.e. under wp-content/uploads), I used another plugin (Import External Images) to import these images from posts and automatically upload it to the WordPress setup.

All this was done on an intermediate staging server in order to access the images on the actual URL. Once I was satisfied with the import on the WordPress install, I made the staging server live.

Hardening WordPress installs

When you host a WordPress site, instead of a static site, the biggest task is to make it more secure against constant botnet attacks and manual hijacking attempts. There are many ways outlined on the WordPress Codex site which is a must read for hardening WordPress installs and making it more secure.

Making WordPress Websites faster

The other important task when hosting a WordPress site is to make it faster to load for the users, specially when you have a high traffic. Apart from using different caching plugins available for WordPress (see W3 Total Cache and WP Super Cache), you should also invest in a good host. As of now I am using DigitalOcean (affiliate link) for hosting my WordPress sites. The SSD servers of DigitalOcean provides optimum speed to the sites served via WordPress.

By using an optimized theme, you can make your WordPress site minimize server request and reduce the size of the pages served.

If you are new to WordPress and hosting, I recommend reading our article on how to setup a WordPress blog for a step by step approach of setting up your own site.

Categories: Development
Related Post