WordPress vs Hugo

Dec. 2, 2017

Managing WordPress can get time consuming. I have tried to move to static website several times but kept going back to WordPress. But there are several advantages of static sites generators that I finally moved for good. I am also advising a lot of my clients to use Hugo especially when they know that they will rarely ever update their sites.

Here are some of main advantages of Hugo (or other static site generators) vs WordPress and other CMS.

No System Administration

In order to run WordPress, you need a web server. You will need to configure it, install database and PHP. A server hosting a website is always connected to Internet. So it is always available target for hackers. This means you need to secure the server properly and keep it up to date.

When using Hugo, you don’t need PHP and database. All you need is a web server, this reduces attack surface area significantly. As long as you don’t have any extra software running on the server, all you need to worry web server being properly secured.

Of course, you can use shared hosting for WordPress and avoid all headaches of System Administration.

No WordPress or plug-ins to update

The one huge advantage of Hugo is that there is no code to execute. Well no code on server to execute. You may still have some Javascript. But this Javascript code executes in a user’s browser and unlikely to be easily exploitable.

WordPress & plugins executes code on a server. This mean bugs in WordPress can be exploited to access your server or even install malicious code. That code can further infect your users’ machines. I have spend hours and hours restoring websites for clients when their websites got hacked. Of course, you can avoid this by keeping your WordPress installation up to date and carefully choosing plugins & themes. But this means regularly logging in the WordPress admin interface and applying any new updates.

On other hand, you will never have to update Hugo generated site once generated. Only time you will update is to change some content on it.

Simpler Backups

Normally, I don’t give admin login for WordPress & server because of risk involved with client installing bad plugin or messing up something else. I used to manage backups myself.

But I have tried to restore WordPress sites that were developed by someone else. Backup were too old, theme didn’t work with current version of WordPress. Some plugins were not in backup file and are no longer available. And the worst backup file contained viruses & malware.

With Hugo, client gets zip file but it includes full functioning website. While it is still technical, but it should be a lot simpler to restore a static website. It can be as simple as uploading a folder to web server.

No Updates that Break your Site

Since static sites don’t need to be updated to secure against hacks, there is very little worry about any update that will break theme. If you don’t update your Hugo version, you should get same results if you run it against same source files.

In WordPress land, I have seen some people not updating their website for months or years and then when they do, it breaks their theme or plugins.

Where WordPress Wins

There is one area where Hugo cannot touch WordPress. When client is actually using their WordPress site as blog or if they regularly post new content. With static sites, client will need to be technical enough to use markdown and git. Or they will email posts to you.

In my experience though most people rarely update their websites regularly enough to warrant all the extra headache involved with hosting WordPress.

My Hugo Workflow

Personally, I moved my blogs to Hugo because of above reasons and I like the new workflow. My workflow consist of

  1. Email myself a blog idea as I get it.
  2. Write a rough draft either in iA Writer on iPad or skip this step and
  3. Write final version in Sublime Text on my laptop
  4. Commit and push

I love iA Writer for its typewriter mode where the line that you are writing stays in the middle of screen rather than at the bottom.