Why you should use Hugo to build your website

Hugo is the best static site generator, plain and simple.

Ron Erdos
Updated December 15, 2020

Here are the top five reasons you should use Hugo to build your websites.

1. You can host your Hugo website for free and it will still be lightning fast

The speed at which your web pages load for users is increasingly important.

Starting May 2021, Google will increase the importance it gives to page speed when deciding which web pages it ranks first in its search results. Here's Google on the matter:

in cases where there are multiple pages that have similar content, page experience [which includes page speed as well as other factors] becomes much more important for visibility in Search.

And of course, page speed matters not just for SEO, but for conversion and user retention also. According to skilled.co:

If your site makes $100,000/day, 1 second improvement in page speed brings $7,000 daily.

So how does this affect you? Well, you can host your Hugo website on a free tier of a service such as Netlify and it will still be lightning fast.

For example, the site you’re reading is hosted on the free tier of Netlify, and I have achieved perfect Lighthouse scores of 100 / 100 for Accessibility, Best Practices and SEO.

I wasn’t scored on the Progressive Web App metric since this is not a PWA.

ProgressiveWeb AppSEOBestPracticesAccessibility

In other words, despite my being on the free plan, Netlify doesn’t limit my site in any meaningful way when it comes to speed.

There are limitations on bandwidth (currently 100GB / month) and other metrics on the free plan, but none have been an issue for me so far.

If you want to know how to host your Hugo site on Netlify, here's a tutorial I wrote on the subject. Note: I gain no financial or other advantage from recommending Netlify. I’m just impressed with their offering.

By contrast, if you use a free WordPress host such as 000webhost, look at the horrible experience you might have to endure:

Your website will be suspended if you exceed the free plan limits (you only get one warning and then your site is gone for good — no recovering your data).

By contrast, Netlify is a delight to use, even on the free plan. And your data is always safe, because it lives in your Git repository.

2. Effortless backups and version control

When I used WordPress to power my sites, I had to remember to back up the database that contained all my articles every so often. And while there are services that do this for you, it’s just another critical task on your list, and one that will likely come with fees attached if you want it done right.

By contrast, all articles, tutorials and images on this site—along with its Hugo templates and so forth—live in a GitHub repository, so I automatically have a backup of all my content. Private GitHub repositories are free, which is great.

Not only that, I have version control built in. If I want to see what a given article (or template) looked like at any point in time, I can do that. I can even see which changes were made, and by whom.

3. Hugo is way more secure than WordPress

WordPress can be secure if it is constantly upgraded to the latest version.

However, what if you’re on holidays (or just plain busy) when an emergency patch comes out?

You either put off doing the upgrade and hope for the best, or you stop what you’re doing to upgrade your WordPress site.

It doesn’t end there, though.

What if the plugins you use (such as those for SEO or social media) haven’t made the corresponding upgrades on their end?

You can either upgrade WordPress—and risk breaking your SEO or social media plugins, in this example—or put off the upgrade and hope against hope you don’t get hacked.

Not a fun game.

By contrast, Hugo has none of those issues.

Your website is just a bunch of web pages—there’s no database to hack.

Long story short: With Hugo, you can rest easy, even if you’re on holidays, or you know, busy.

4. Hugo builds your site much faster than other static site generators

Are you sold on static site generators (SSG), but unsure as to which one to use?

An important consideration is how long each SSG will take to build your site. In practical terms, how long will your SSG take to publish your new article so you can put it on social media?

Hugo is very fast. Its makers say:

Hugo is the fastest tool of its kind. At <1 ms per page, the average site builds in less than a second.

Okay, so how does that look in practice? Canadian developer Jason Rametta takes us through the numbers in comparing Hugo with rival SSG, Gatsby:

a [Hugo] site with 10,000 pages can take just 10 seconds to build, whereas a Gatsby site with 10,000 pages, with the same amount of data, would take 30+ minutes or even hours to build.

OK, but what if you don’t have a site with 10,000 pages? What if your website is only a couple of hundred pages? Rametta continues:

It is not unusual for Gatsby builds to take more than 20+ minutes to build a production site that only has a couple hundred pages.

Ouch. I don’t want to wait 20 minutes (or more) for my new article to appear on the internet. I want to publish, tweet it out, and then go have dinner. With Hugo, I can do just that.

5. Hugo has no dependencies

Did you know that if you use Jekyll as your static site generator, you can run into all sorts of issues—such as not being able to update your website—if your installation of Ruby on your local machine is not what Jekyll is expecting? And some updates of macOS could change your Ruby setup without asking you?

That’s because Jekyll is written in Ruby and it relies on your local installation of Ruby to operate.

Here’s IT services provider eSolia on why they picked Hugo over Jekyll and other static site generator (SSG) options:

The problem with certain SSGs is that you have to install and maintain a programming language like Perl, Ruby or Python on your system, to get them working.

Most SSGs therefore come with the overhead of maintaining a development environment for a required programming language, and all its myriad dependencies. What that really means is the environment has to be kept updated, and that trouble will likely occur when you upgrade or patch the OS. Sometimes, this can get really difficult and irritating. Your site then cannot be updated until you get everything installed just right.

By contrast, Hugo (which is written in the Go language) does not have any dependencies on your local machine.

Everything you need to run Hugo is included in the precompiled binary, whether you’re running macOS, Windows, Linux, OpenBSD or FreeBSD.

Here are the creators of Hugo on the subject:

There is lots of talk about “Hugo being written in Go”, but you don’t need to install Go to enjoy Hugo. Just grab a precompiled binary!

Personally, I use a Mac and I’ve installed (and update) Hugo with Homebrew. It’s as effortless as can be.

I can also update macOS itself without ever having to worry if it will affect my Hugo installation—it won’t.

"Thanks so much for your work ... I'm migrating my WordPress blog to Hugo and it's been really helpful." — Francisco S., engineer and blogger

"I love your content. The information that you provide have been very useful in the development of my personal website." — Mattia C., engineer and researcher

The planets in our solar system