Skip to main content
  1. Tech/

WordPress vs Hugo

·4 mins

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 site generators, so 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 the 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 a database and PHP. A server hosting a website is always connected to the Internet. So it is always an 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 about is the web server being properly secured.

Of course, you can use shared hosting for WordPress and avoid all the 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 the server to execute. You may still have some JavaScript. But this JavaScript code executes in a user’s browser and is unlikely to be easily exploitable.

WordPress & plugins execute code on a server. This means 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 spent 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 to the WordPress admin interface and applying any new updates.

On the other hand, you will never have to update Hugo generated site once generated. The 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 a client installing a 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. Backups were too old, the theme didn’t work with the current version of WordPress. Some plugins were not in the backup file and are no longer available. And the worst, the backup file contained viruses & malware.

With Hugo, client gets a zip file but it includes a fully functioning website. While it is still technical, it should be a lot simpler to restore a static website. It can be as simple as uploading a folder to a 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 the theme. If you don’t update your Hugo version, you should get the same results if you run it against the 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 a 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 consists 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 the screen rather than at the bottom.

Related

iPad Pro for Programming & Fun

·4 mins
I finally bought a 10.5" iPad Pro (Affiliate Link). It was mostly an impulse purchase. When I first started to use iPad, it felt blah. It is hard to find good apps or what apps you might want to try out. My main goal with iPad was to have a really small laptop replacement. So I was hoping for a decent code editor. There are some code editing apps but there is no way to try them out before purchasing. So I am spending a lot of time reading reviews before I purchase any app.

Upgrading to PHP 7.0 on Ubuntu 14

·1 min
I upgraded PHP to version 7.0 on an Ubuntu box. Running php -v on shell would show it as version 7.0. But Apache was still using PHP 5.6. I tried various methods to update settings for Apache but nothing worked until I issued the following commands: sudo a2dismod php5.6 sudo a2enmod php7.0 sudo service apache2 restart Source: PHP 7.0 (and 5.6) on Ubuntu | LornaJane