After 6 years of hosting my blog in WordPress , I ported it to Hugo , a static site generator. I used to be a big WordPress believer. I’d tell anyone who wished to hear, and many who didn’t, that WP was the answer to everything. Whether you’re building a personal blog, an e-commerce site, or a portfolio showcase. That belief was crumbling for the last few years up to the point I turned almost 180 degrees. WordPress is very much not the answer to everything, and you should be very mindful when using it.
I found static site generation (SSG) to be a very interesting and effective approach to making websites. Performance was the original reason I was tempted by SSG, which I was able to improve a lot, but it also allowed me a much more productive development cycle and much better control over my site. Whether I want to publish a new post or tweak the UI, my productivity is now through the roof in comparison to what it was with WordPress.
Let’s dive a bit deeper into these technologies and see their pros and cons.
WordPress is particularly interesting considering that about 40% of all websites run on it. At its core, WP is a content management system (CMS). It allows you to add content like blog posts, reviews, images, etc. A backend admin dashboard allows you to add and edit that content, design the theme, manage users, etc.
On the site layout side of things, WordPress is a massive beast with an endless amount of themes and plugins to choose from. There is an entire industry that creates and sells whatever your heart desires, whether it’s an e-commerce plugin, a photo studio theme, a paid subscription site, an SEO plugin, etc. No other web platform comes close to the ecosystem of WordPress.
In my case, performance wasn’t a huge deal. Don’t get me wrong, I didn’t know any of this stuff when I started and my performance was horrible for years. But at some point, I became aware of this issue and made big efforts to improve it. That’s when I started noticing the horrors of WP. My premium theme, from a top developer mind you, had bad performance even on a bare naked site. I removed it for the minimalistic Astra theme . Then, I rigorously checked every plugin and removed those that affected perf, which were most. For example, I had to go through 6 plugins to add social sharing buttons because the first 5 added an unbelievable amount of overhead.
By the way, if you want decent hosting, go with a VPS offering like Cloudways .
Static Site Generation
Another trait of SSGs like Hugo is that they treat Markdown as a first-class citizen. You’re expected to write posts and pages in ‘.md’ format, which is hands-down the most productive way to write anyway, and this serves as the input from which the pages are generated.
With SSG, you’ll usually have your
.md files in a source control like GitHub
and when you’re pushing new content, a host like Netlify
will trigger a build that generates new HTML/CSS/JS content and deploys it to a Content Delivery Network. In WordPress, on the other hand, I would have to export my markdown to HTML, then go to the WordPress dashboard, copy-paste that HTML to the WP editor, upload whatever images I had and adjust the URLs, add categories and tags, and publish. That might sound easy, but that’s a whole lot of button clicks. With every action in the WP dashboard adding a 10-second lag, that’s an unpleasant process. And if I had to edit a post, then either I had to change the HTML manually, or do it in my markdown editor, export to HTML again, change image URLs again, and copy-paste to the WP dashboard again.
But SSGs have a lot of downsides as well. For one thing, the ecosystem is minuscule in comparison to WP. I couldn’t find any theme that fit my needs and I had to duplicate my site’s design and layout from scratch. This might sound like a downside, but for me, it’s an upside. Making any sort of change in WP layout is a nightmare, whereas with Hugo, I can easily tweak whatever I want. As for plugins, they are not a thing in most SSGs.
So static site generators aren’t for everyone. I don’t expect most normal people to work with git or to write in markdown, not to mention that I don’t expect them to design a website’s layout with HTML. However, if you’re a technical person, this is so much better.
Back to WordPress
Despite my earlier rant, I do realize WordPress is a god given in many cases. You can get a good-looking website up and running in no time. You can add plugins for pretty much anything and create a subscription site, an e-commerce site, or a landing page for your new product easily. You can add users with different permissions to write and contribute to your newspaper site. So even though WP is terrible in many ways, it’s still awesome in other ways. And if you know what you’re doing, you can even create a WordPress site with decent performance.