Switching From Wordpress to a static website (hugo)

I’m a big fan of Wordpress, I started using it almost 10 years ago, I also created/adapted a ton of plugins/themes during the first part of my career. It’s a wonderful tool to create a website in a few minutes, the back-office is really easy for the non-techs people. But, it’s also a pain in the a** to maintain, you have to have a SQL database, to update the plugins on a regular basis, you need to check the spam folder, etc…

I wanted something lighter

I think you get my point, I’m tired of all the work needed to maintain a WP blog. Even a server, I just want a place somewhere to publish some occasional blog posts. No database, no apache, no plugins, no comments (i.e. no spam), no cache, no PHP.

HTML + CSS + content. That’s it! At this time I didn’t have a strong opinion on the engine, Jekyll, Hugo, Pelican, whatever language, as soon as I have clean HTML at the exit!

Medium?

I started to publish on Medium for these reasons, the design is super minimalistic, super easy to use. Medium is also a social media, so you can have a better exposure through their network (with all the claps & share mechanism) But it’s proprietary, I was not comfortable to put all my content on a platform - even if the export feature is pretty well done. Then, they put some annoying paywall in front of every Medium “stories”. And I started to miss the old RSS time. When you can browse as many websites as you wanted. It was to time to move from Medium.

I feared the migration

Get the content published on Medium was easy (2 clicks). But moving my Wordpress content was frightening me. I don’t know if you ever tried but, moving a WP blog from a server to another is soooo much pain. You need to dig into the db, change the URL, fiddle with the permalink. Most of the time the back-office is broken, you can’t log in anymore etc… It happens to me before, I didn’t want to do it again.

I was ok to migrate to a lighter blog engine but I definitely don’t have the time to spend a day on crashing everything!

And I discovered the doc of hugo and it’s plugin WordPress to Hugo Exporter. Look at the description:

One-click WordPress plugin that converts all posts, pages, taxonomies, metadata, and settings to Markdown and YAML which can be dropped into Hugo.

One click? Really?

I gave it a try, and yes, it’s insane but it works in 2 lines.

php hugo-export-cli.php
wp hugo-export > export.zip

And BOOM all your posts, pages, tags are in a zip file. You can drop this file to Hugo by copy/paste them into the content section, launch your local server with hugo server and VOILA. Your whole Wordpress content can now run without any PHP or any database! Just plain Html and CSS! Easy to host, easy to move, easy to modify!

And it’s blazzing fast! with this theme I have a 100100 score on pageSpeed, Google is going to love that :)

Hugo is (still) for nerds

Hugo is great, it’s super fast, the blog engine is quite powerful but you need to be a software engineer to run it.

In fact, there is no user interface for editing your blog posts (like WP have). You edit your blog posts in markdown in a text editor (like Vim) or in a writer-specific app like Zettlr or Ulysses. Then, you add them to git and push them to your hosting. It’s not super complicated, Hugo’s docs are very clear but you still need to know how git works and understand a bit of bash… The same story for the style of your blog, you can pick a theme in the themes gallery clone it in your themes folder (add it as a submodule) and set it up in your config.toml. Nothing really hard, but, again, you need to know git and not be afraid of edit a config file :)

If you’re ok with that, go give it a try, really! And, then, let me know what you think about it!