
The Search for an Alternative to WordPress
WordPress has been my go-to CMS solution for blogging since 2013. It’s well-documented, open source, and offers a vast ecosystem of themes and plugins that make blogging super simple for the average Joe.
It’s without a doubt an excellent choice for 90% of the blogosphere. Especially for users with little to no technical skills. That’s why it holds so much market share after all.
The development community, on the other hand, loves to hate on WordPress.
I never fully understood why until over the years I too began to feel restricted by the WordPress ecosystem and its shortcomings. I knew there had to be a more lightweight solution out there for something as simple as writing and sharing your thoughts with the world.
Eventually, after many hours of research, I found what I believe to be the best alternative tech stack to WordPress. If you have a solid set of technical skills, even better.
That solution is the Jamstack. More specifically, static site generators.
What to Look for in a Blogging or CMS Solution
When I was searching for a new CMS, I had a few key criteria in mind:
- Page speed - An important metric for SEO and keeping bounce rates down.
- Security - There’s nothing more frustrating than your site getting hacked.
- Hosting costs - Hosting is a commodity, why pay more than you need to?
I also needed the solution to be SEO-friendly and customizable with a streamlined workflow for blogging.
That sounds like a lot to ask for, right?
Luckily, static site generators check all these boxes. Especially if you have some basic front-end development experience.
Key Differences Between Static Site Generators and WordPress
How does an SSG differ from your standard content management system? Here’s a brief explanation for the unaware.
WordPress is a traditional CMS with a backend written in PHP. When you save a post, a bunch of programming magic happens and your data is inserted into a database (typically MySQL). This database is where all your posts and other data are stored.
When a user visits the URL associated with your post, an HTTP request is sent to your web server. PHP then queries the database to fetch the post data, locates the appropriate static assets, and proceeds to generate your content dynamically. Finally, it transmits that data back to the client (i.e. web browser) in the form of an HTTP response.
There are other intermediary steps that I left out but that’s the basic gist of it.
Static site generators on the other hand don’t use server-side code like PHP to fetch data from a database and dynamically generate content at the time of request.
Rather, SSGs are server-side programs that build your dynamic content into individual static files prior to deployment. These files are then compiled into a public folder where they can be served by your web server directly.
This preemptive build process is what eliminates the need for a database or any server-side code in production at all.
WordPress Managed Hosting vs. Dedicated VPS
If you’re dead-set on using WordPress, here are some hosting recommendations based on my personal experience.
Depending on the quality of your hosting solution, WordPress can be painfully slow with poor performance across the board. Namely on cheap shared servers with no caching mechanism in place. If you have some basic Linux skills or are willing to learn them, I highly recommend installing it on a virtual private server (VPS) like a Digital Ocean droplet instead.
I went this route after some frustrating experiences with Hostgator and their support. To my surprise, it also ended up increasing page load speeds dramatically. Not to mention it’s usually cheaper than managed or shared hosting plans. I haven’t used a shared host since.
The only downside to this approach is the need to manually keep your server and packages up to date. But you have to keep themes and plugins updated on every WordPress install anyway. It’s simply a matter of whether you’re willing to learn the basics of how to manage a server.
If that’s not an option, you could alternatively streamline your VPS management with a service like Server Pilot or Cloudways. They provide an admin panel similar to cPanel and handle server updates for you for just a few extra bucks per month.
Either way, it’s easier than ever to install WordPress on a VPS.
Digital Ocean recently added a pre-built WordPress droplet to their marketplace, and I’m sure other hosts have followed suit. As someone who’s used both that and a one-click install on a managed host, I can say with confidence that they’re almost equally convenient.
Using a pre-built droplet eliminates the need for installing a LAMP stack (PHP, Apache, and MySQL) manually.
But that’s enough about WordPress for now. Let’s dive deeper into static site generators.
How do Static Site Generators Work?
Before I explain how SSGs work, I just want to clear something up first. Websites with a backend still can and do serve static files. Static is just a fancy way to describe files that are served to the user as is without the need for dynamic processing.
If your website’s content isn’t rendered server-side at the time of request, you’ve got yourself a fully static site.
Now consider blogging in this context for a moment. At a basic level, your average blog post is really just a static piece of content that is served in the same form to each user who visits a particular URL on your site.
So what’s stopping us from taking the backend logic and database out of the picture completely by simply serving content as static files directly?
Hint: Nothing, that’s where static site generators come into play!
As I mentioned earlier, SSGs are designed to build your static files and compile them into a public folder. Your web server then monitors this location in production and serves the relevant content to the users requesting it.
During the build process, the SSG looks for a collection of (typically) markdown files that define your post content. This makes it super easy to manage all your content in just a text editor if you so choose.
There are even static hosting solutions that monitor your source control repositories for changes and automatically run the build process for you. This makes the entire process completely hands-off for the admin. Simply push commits to your upstream repo on a branch of your choice and like magic, your site is updated.
Some other benefits that make static site generators a great WordPress alternative:
- They load quickly and improve page speed indexes, which is an increasingly important SEO signal.
- They are extremely secure and safe from SQL injection (no database remember?).
- Hosting is cheap, especially for small sites with a low amount of traffic or bandwidth requirements.
- They are easily customizable with just a basic knowledge of front-end development and your SSG’s supported templating language(s).
A Quick Warning for Non-Technical Users
Before you dump your WordPress site, here’s a quick disclaimer for non-technical users.
If you’ve never used a source control tool like git, shudder at the thought of using the command line, or are unfamiliar with the building blocks of the web, I wouldn’t recommend using a static site generator in most cases.
SSGs are developer-friendly, but your average user with mediocre tech skills will likely have a bad time if something breaks. Opting for a solution like WordPress or Webflow will almost always be a better use of your time if that’s the case.
Writing Posts in Markdown vs. WYSIWYG
Another downside to most static site generators, in my opinion at least, is that they don’t come shipped with a built-in WYSIWYG editor to help make writing content easier. Content creation is typically done in markdown, reStructuredText, or other common markup languages. There are exceptions of course.
While markdown is easy enough to learn, what if you’re building out a site for a non-technical client and they request the ability to manage content themselves? Perhaps you simply want to focus more on writing and less on markup syntax?
This is where headless CMS software comes to the rescue. A headless CMS is a content management system that allows you to publish content directly to your source control repositories via git or API calls.
This opens up the possibility of utilizing a CMS-like interface similar to that of WordPress while still taking advantage of all the benefits static site generators have to offer.
If you’re really brave, you can even use WordPress as a headless CMS by plugging into its API!
The Best WordPress Alternative: Hugo and Netlify CMS
After some further research, the two best Headless CMS I came across for simple projects were Netlify CMS and Forestry.io. For static site generators, I was torn between Hugo and Jekyll.
The official Jamstack site has a great list of recommendations for both SSGs and Headless CMS.
In the end, I went with Hugo and Netlify CMS.
Hugo is hands-down the fastest SSG out there in terms of build speed (it’s written in Go). Build times for small to medium-sized sites rarely eclipse more than a second. Plus, it offers a plethora of useful features for content-based sites like an auto-generated table of contents, word counts, reading times, and much, much more.
Integrating both solutions is pretty seamless and well-documented. Since Netlify CMS is an open source project maintained by Netlify, you can host your site on their platform as well and authenticate to your CMS in a simple way with Netlify Identity.
Ultimately, there are a plethora of SSG solutions out there and it’s hard to go wrong with any of them. If you’re new, I would base my decision on the size of the community and how well-documented it is. Hugo definitely fits the bill there.
I would avoid choosing your SSG based on the programming language it’s built with though. Unless you plan on contributing to the project or customizing its behavior that is. I’d much rather work with an SSG that has all the features I need out-of-the-box as opposed to a sub-par solution in the language I’m comfortable with that requires extensive customization. But that’s just me.
Benefits of Statically Hosted Files
I host all my static sites on Netlify and would recommend it, even for beginners.
The DNS setup was a breeze and their starter plan includes free Let’s Encrypt SSL certificates. I’ve genuinely never had a problem with their service and I have about 5 sites running on there at the moment.
You can even use Netlify forms and Zapier webhooks to collect email subscribers and add them to lists in an ESP like Mailerlite. Here’s a Zapier automation I created for this very purpose. Feel free to steal it.
In fact, you can use Zapier to essentially replace all the clunky WordPress plugins on your site that are not only annoying to use but could also pose a security risk if they’re not kept up-to-date or in active development.
If you’re more technically inclined, you can write your own custom serverless functions with Netlify and take Zapier out of the picture completely.
What it all comes down to is this: static sites are ridiculously easy to deploy and maintain.
Netlify is one of those hosts I mentioned earlier that can monitor your repositories and automatically deploy your sites as soon as you push changes to Github.
This is much less complicated than deploying traditional server-side apps without a CI/CD pipeline in place.
Are You Ready to Make the Switch?
I hope this was a helpful overview for anyone contemplating the switch from WordPress to a static site generator for their blogging or CMS needs.
If you have any questions about the process let me know!