From Word-Press to Hugo

From Big and slow to Small and Fast

From Word-Press to Hugo

From Big and slow to Small and Fast

I’m Moving from Word-Press to Hugo

The main reason I moved is that I don’t like Word-Press as an editor. I first write my posts in Emacs and then copy it to Word-Press for the final edit. There I set fonts and tags and so on. But with Hugo, I can do all that from within Emacs offline. Writing in Word-Press is for me a slow and cumbersome process.

If you are used to writing in Emacs, you don’t want to use Word-Press. If you don’t know about Emacs you are loosing out. If it can’t be done in Emacs, it can’t be done! It has a steep learning curve (I don’t think you ever learn it all) but it is worth the time to get started at least.

Size

Another benefit with a static Hugo site is that is it small and very fast compared with Word-Press. I did a backup of another Word-Press site that I changed to Hugo and it contained over 5000 files and over 80MB in size. This for only a handful of posts and pages. After the switch, it has less than 200 files and 5.1 MB in size.

Security

There is nothing to hack on a static page, so there are no security issues with Hugo. There are plugins that have to be updated all the time. Word-Press is a popular target for hackers.

Speed

You can preview the result of your post in Hugo as fast as you can write it. That is something you can’t do within Word-Press. Hugo is written in the Go language and very fast. I build this site as it stands today in 26 ms.

Hugo

Hugo static site generator

Markdown

In Hugo, you write all your posts in markdown and you can preview it with Hugo’s fast web-server offline. When you are satisfied with the look and feel of the post you just export it to HTML with one command: hugo in your site folder.

The Public folder

After the export, Hugo creates a public folder in your site (in a folder on your hard-drive). Then is it just a matter of uploading the content in this folder with FTP to wherever you like it hosted. You can read all about it on the Hugo website. See the links below.

Comments

As you know comments are an important factor for your page rank, so you don’t want to lose that. But Hugo comes with support for Discus and you can import your Word-Press comments into Disqus and have them show up in your new Hugo site.

Themes

I have not counted, but you have a lot of themes to choose from. Maybe not as many as with Word-Press, but you only need one. And if you don’t find anything that suits your taste, you can write your own theme. Beautiful Hugo is the one I’m using for this post. And it’s really beautiful, just what I need for my blog.

If you are using Skimlinks or any other affiliate marketing service, you have to paste a code snippet just before the </body> tag. In the theme I use, Beautiful Hugo, you put the script in the footer_custom.html where the </body> tag is. You can find it in the /layouts/partials folder of your theme. Copy it to your /name-of-your-site/layouts/partials/ folder and insert the snippet there.

<script type="text/javascript"
src="https://s.skimresources.com/js/<your code her>.skimlinks.js"></script>

If you use any other theme you have to investigate where to put the script.

The Hugo website
A lot of tips on moving to Hugo: blog.philipphauer.de
Emacscast: Where I got the idea
Importing comments from Word-Press
Configure comments in Hugo
FileZilla - the free FTP solution
Mike Dane - YouTube

comments powered by Disqus

See also

comments powered by Disqus