4 Steps to Migrate from WordPress to Jekyll

      5 mins read.  

4 Steps to Migrate from WordPress to Jekyll

WordPress to Jekyll migration is simple if you have a small website. If your site is huge with many posts, you may have to go through some extra steps.

Why WordPress to Jekyll Migration?

There are plenty of reasons to switch from WordPress to Jekyll. One of the main reasons for me to make the switch was cost. I used to host my WordPress blogs on Hostgator. It is a good hosting service but my websites were not earning any money.

In the beginning, websites will not be earning any money. It takes a while to build audience and following. Monetizing the site after building a stable audience makes sense. But the reason for building the blog should not be making money. The reason should be to either help someone or solve a problem.

Having said that, we usually write what we are passionate about. We spend a lot of time to write an article, research on it, edit it, find suitable images etc. After all the effort, we have to pay for few things to keep the website running.

I only pay for the domain name.

Maintaining a website involves domain purchase(yearly) and paying for hosting(monthly). Domains are relatively cheap. You can easily get one for $10 to $15 per year. I used to pay around $12 for hosting every month. It is not a big amount but I wished if there was a way to save it.

Once I found Github Pages, I never looked back. I moved all my blogs to Jekyll. Moreover, I like designing websites. Jekyll is the best website builder among all the platforms I have tried.

You will lose a lot of features when you make the switch from WordPress to Jekyll but if you are a minimalist then you will not regret it.

How to Migrate from WordPress to Jekyll?

WordPress to Jekyll migration is really simple for a small blog. But when there are too many posts, you might encounter a lot of errors.

I cannot cover everything under the sun but I have tried to present all the issues I have faced while migrating.

Bigger the site, higher the complications.

We have to export all the pages, posts and media. Pages and posts will be converted to markdown while exporting. So we can directly put these things inside any Jekyll theme. It should work as expected with some troubleshooting.

Jekyll Export plugin is not so compatible with other WordPress plugins. So try to deactivate all other plugins before performing the export. Try to achieve a plugin-free WordPress site and then run Jekyll Export.

Here is how you can Migrate from WordPress to Jekyll.

Step 1: Install Jekyll Export

Jekyll Export is a WordPress plugin built by Ben Balter.

Install this plugin and run it. Everything will be exported and downloaded as export.zip.

Step 2: Unzip and serve using Jekyll

Unzip the downloaded zip folder. It should have all the necessary files like _posts, _config.yml, index.html, wp-content etc.

We need only _posts, wp-content and other required HTML pages. Move these folders to a Jekyll theme. Test it locally. If everything works then upload the site to a repository on Github Pages.

You can look up the Jekyll Tutorial for setting up the site in the right way.

Step 3: Export comments

Disqus Comment System WordPress plugin allows you to export all the WordPress comments to Disqus. Once this is done you can easily put the Disqus installation code in Jekyll and the comments will show up the respective posts.

Here is a guide by Disqus on how to import WordPress comments to Disqus.

Step 4: Change DNS to point to Jekyll site

Do not perform any DNS changes until unless the Jekyll site is completely ready. This process can be tricky because DNS propagation takes a while to take effect. At times we get confused whether the change took place or not.

Here is an article on how to use custom domain using Github IPs.

Here is a short video of the same.

Issues

I have seen a lot of things going wrong from the time of exporting content to building a Jekyll site. The major one is, the posts exported are not true markdown files. They will have a lot of HTML content in them.

This is not the problem with the plugin but WordPress add these inline styling to headers, paragraphs, bold text and almost on all the HTML elements which cause such problems. There is no solution for this but it does not cause any errors.

Names of images in WordPress can have non-ASCII characters like á, é etc. Jekyll does not like those characters. It will not let you build the site unless you change all those characters to ASCII.

Jekyll does not recognize shortcodes placed inside posts or pages. Jekyll throws an error until they are completely removed.

Conclusion

Even though the migration can pose a lot of problems, I’m pretty sure you can fix those issues or get some help from the community. The flexibility of having a local copy of the complete website is the single most advantage you should consider for a secure website. I’m pretty sure you will like Jekyll.

Thanks for reading!

This article is written by Follow him @webjeda.

You May Also Like

0 Comments