DEV Community

Cover image for Wordpress Sucks. Let's Switch to Static Site Generators!

Wordpress Sucks. Let's Switch to Static Site Generators!

Glenn Paquette on May 27, 2020

What's All This Fuss About Static Site Generators? As a web developer, it has been impossible not to notice all of the excitement on the...
Collapse
 
ricardodsanchez profile image
Ricardo Sánchez 👨🏽‍💻 ☕

I am all for trying new things but your premise that you are doing it because WordPress is slow is wrong. WordPress, just like any other framework or platform can be slow and problematic if not setup correctly. That's all.

Collapse
 
paqman85 profile image
Glenn Paquette

Fair enough. Just looking for a better solution for simple sites, and I personally haven't had any good experiences with WordPress. I assume others may feel the same way. :)

Collapse
 
ricardodsanchez profile image
Ricardo Sánchez 👨🏽‍💻 ☕

I can relate, it took me a while to understand enough about WordPress in order to make it work the way I wanted. And I cannot argue with you about looking for better solutions for simple sites, WP is definitely not what you want to use for a simple site or better said, a site without the need of a CMS. Cheers.

Collapse
 
jakesweb profile image
Jacob Colborn

The 2 that I have used so far are Jekyll and Gatsby. Jekyll is great to set up a blog and handle all of the content that would need to be uploaded for a blog. Gatsby was very customizable and everything runs in React, which I am familiar with. When I created my portfolio site for myself I used Gatsby. It was great to get up and running and easy to deploy with Netlify.

For my next move I am going to try to create some Nuxt sites (once I am done with the current hackathon). I chose to learn Vue during my time in the hackathon and want to expand on that with Nuxt.

Collapse
 
paqman85 profile image
Glenn Paquette • Edited

Thanks Jacob!
Gatsby is definitely pretty popular. It's on the list! Jekyll as well. Nuxt seems to be quite popular as well! I remember your hackathon post, I hope that project is going well for you!

If your learning Vue and like it, have you considered Gridsome? I haven't heard much about it yet but I like that's it's based in Vue.

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt

Gridsome (and Gatsby) is only alive because of plugins, IMO. Otherwise, writing codes for scratch is hard. And the availability of plugins depends on its popularity. That's why Gatsby is much better than Gridsome. Also, the documentation.

I myself currently try to learn Next.js, though. which encourages barebone-ness; unlike Nuxt where there are a lot of boilerplate to edit.

Collapse
 
jakesweb profile image
Jacob Colborn

I'm going to read up on Gridsome now. This is the first I've been hearing about it, but it would be interesting to learn something new to compliment Vue. I've been really enjoying learning Vue so I hope to expand my knowledge of it overall.

Collapse
 
bayuangora profile image
Bayu Angora • Edited

I'm with Jekyll on my first static site playground, because it's easily deployed on GitHub Pages. But the build and deploy time is going slower when articles going huge.

When my articles almost thousands, I moved my site to the current fastest static site generator, Hugo. It won't be wrong when choose Hugo for huge articles. Also, I try Eleventy for my new learn and backup too.

Next, Nuxt, Gatsby, Gridsome, etc, they are great because it's instant reload feature that feels like modern apps. But if the main focus is about creating so many content continually, just choose the fastest static site generator.

Collapse
 
paqman85 profile image
Glenn Paquette

Thanks for the info! That's a great point to keep in mind. I've been playing with Hugo a bit, so far it's pretty nice!

Collapse
 
saunved profile image
Saunved

I've used Nuxt.js for a few projects and it's been a breeze. The docs are well-written too, and it comes with some pretty cool features like nuxt generate. If I am asked to make a static website, I will probably continue making it in Nuxt. You can also use Netlify or Vercel to instantly deploy websites via a git push for free.

I've also heard good things about Metalsmith and Hugo but I haven't personally used these yet.

I also use Jekyll to maintain a community blog, but I find it a little outdated now (it uses the Liquid templating language, and handlebars are a far better solution).

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt • Edited

nuxt generate. If I am asked to make a static website, I will probably continue making it in Nuxt.

Nuxt generate is currently problematic -- Full static generated mode

But for my current website, I am being lazy, using SSR instead of generated. That's why it is bad for SEO.

Collapse
 
saunved profile image
Saunved

Thank you for the link to the Github issue. I have only used Nuxt to create offline web-apps or fully static websites (no API linking whatsoever), so I guess I am in the clear for now. But I will definitely hold off on using it for projects that might integrate with a Headless CMS.

Collapse
 
paqman85 profile image
Glenn Paquette

Thanks for the suggestion! I'll add Nuxt.js to the list, and take a look at the others.

Collapse
 
elabftw profile image
eLabFTW

I use Hugo, it's great and fast and all is in markdown. Put HAproxy in front of it to handle TLS and you're good to go! Everything in docker too ;)

Collapse
 
maymeow profile image
Meow • Edited

Do you use hugo to serve pages? (just running hugo in docker?)

Im using hugo to build page with Gitlab-Ci and then its hosted with gitlab pages / nginx or pushed to custom hosing if clients have one.

Collapse
 
elabftw profile image
eLabFTW

Yes hugo server is serving the pages and HAproxy is taking care of terminating TLS.

Collapse
 
paqman85 profile image
Glenn Paquette

I've been playing with Hugo a bit! I like it so far. :) Thanks for the recommendation.

Collapse
 
felipperegazio profile image
Felippe Regazio • Edited

I agree that Wordpress Sucks nowadays. But i dont think static site generators can replace it yet. Wordpress sold and idea of freedom to customers. Even if its true or not, in a practical manner, they wont expect nothing less. With this in mind its just too hard to explain a static site generator for customers. What we can say when they ask "cool, so where is my dashboard?".

Collapse
 
paqman85 profile image
Glenn Paquette

Your right if the clients are actually logging into the dashboard. Mine say they will but never do. I think it won't be hard to convince them to make the switch, and sell them on a low maintenance retainer for updates instead of server hosting.

Collapse
 
felipperegazio profile image
Felippe Regazio • Edited

yeah, you are totally right. customers are attached to that "sensation of freedom" (created by wordpress) which its also a trap. They wont/cannot/dont want to use it, even when this freedom actually exists (mostly i see devs tuning wordpress sites as manainers of a frankenstein). Its a freedom that customers dont use, but also dont want to let it go. Its paradoxical man S:

Thread Thread
 
paqman85 profile image
Glenn Paquette

Thanks! You hit the nail on the head. Thats my biggest pet peeve, WordPress Frankensteins.

In an ideal world, customers would let me build them a static site for the info/ brochure need, and code a purpose built application for their business logic / e-commerce needs. This whole idea of franken-plugin WordPress to do everything is just a nightmare.

Collapse
 
bayuangora profile image
Bayu Angora • Edited

Client should login to their dashboard mostly for update article purpose, not for updating core, themes, plugins, etc. Also, this is the big advantages about static site generator, because we don't have to worry about being hacked when we forget to click update. Fortunately, there are so many CMS such Forestry, Prismic, Contentful, etc. Just connect the static site to those CMS for client dashboard, and it's more than enough.

Collapse
 
paqman85 profile image
Glenn Paquette

Great point! Thanks! :)

Collapse
 
emil_priver profile image
Emil Privér

You dont need to remove Wordpress, Use Wordpress as a source for a CMS. Alot of dev use thins kind of setup. the customer gets Wordpress which is an really good admin for customers and the users get a fast static site :D Soon will there be a Gatsby plugin which handle everything from preview to images which will be dope :D

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt • Edited

Being a blog writer myself, I'd say a CMS is eventually needed, whether headful or headless. Also, SEO is hard. WordPress can fix it with certain plugins (like Yoast and WP Compress) (sry, not that good as it should be. WP is by default bad for SEO.)

I don't think fast build is that important. Also for developer's convenience, I would also look for SSG incremental build, which is a relatively new feature even in Gatsby. I wouldn't want to see slow build times. Still, SSG (with some SSR features) is definitely the future.

Actually, for what I have heard,

  • WordPress can be a headless CMS.
  • WordPress can be cached to static HTML files, not to pull from MySQL every time.
  • Again, not default.
Collapse
 
paqman85 profile image
Glenn Paquette

Thanks for the notes! These are my own personal, very biased thoughts on it.

For my own situation, my clients do not update the site or post new content frequently. I'd rather just turn the content to markdown and leverage continuous integration on Github to update the sites then manage a CMS for each client.

You're totally right SEO is hard, but for the type of client I have, just adding the metadata to the site and posts in the HTML template and markdown will be simpler, and be enough SEO for them. They're focused on ranking locally, which is easy in my area since no one does SEO well. Off-site optimization is typically where the impact is made for these clients.

I'm new to SSG, so when I read "fast build" I'm not 100% sure what you're referring to the compile-time to generate the static files or the development time to launch the site?

The build I care about is how long it will take me to build the site and launch it for a client. The fewer hours it takes me on a project, the more money I make (I work with fixed rates).

If you mean the time it takes to package the site, I'll stick my neck out and say it's pretty irrelevant to most freelance web developers who work with these types of small clients and brochure style websites. I may be just ignorant of the importance mind you -- happy to be educated on it! :)

In my heart of hearts, I want to kill Wordpress and bury it where none of my clients can find it again. But in this situation, using it as it was meant to be used - a blog CMS - you're right, we can use it and run it headless. I won't, since for me it's left a sour taste in my mouth, but it would be a fine solution for anyone who likes it.

Collapse
 
patarapolw profile image
Pacharapol Withayasakpunt • Edited

CI hooks and flat file CMS (i.e. no database) is definitely a way, as long as you don't need "relational" database.

Markdown? Actually it is even possible to use an editor that outputs HTML and CSS (like QuillJS). Otherwise, I myself don't use a real Markdown. I use Markdown extended with template engines like LiquidJS -- taking dev.to editor as any inspiration.

One of the best Markdown based editor I know is actually Discourse. It's Markdown mixed with custom codes, somewhat like BB lang.

Some of the reason you might need a backend or database, includes search engine. You can use JS-search, but where would you hold the index for searching?

Collapse
 
bayuangora profile image
Bayu Angora

Agree about default WordPress is bad for SEO. Even their default permalink is ugly one, not readable as title post slug. That's why we have to configure it manually or with plugins help to make it easier.

I'm active on WordPress for long. Though I'm with static site generator for now, but I will not forget WordPress as a hero. Even I'm still active as a moderator at WordPress Indonesia. Enjoy with worldwide community on WordCamp. And more.

Collapse
 
paqman85 profile image
Glenn Paquette

Sounds awesome! I think WordPress has been a gateway for developers. You can start making sites with no coding knowledge, then you get more and more familiar and learn more and more coding. Eventually, some of us move on to work with other frameworks and languages, but we would never have gotten there without starting in WordPress. After years of WordPress, I'm just ready to move on to something else. :)

Collapse
 
mrgswift profile image
Matthew Guillot

If you have a website project that needs more features then a Static site generator provides (CMS features), OctoberCMS is a really decent static page CMS (No DB needed for content) based on Laravel. On the frontend it supports twig, and It also has an amazing config file (YAML) based backend interface generator plugin called Builder. OctoberCMS is much faster then Wordpress and allows you to create plugins (similar to Wordpress), but every public plugin requires a code review (coding best practices) before being published. So you don't have to deal with messy code. The community is growing everyday and everything is fully documented.

Collapse
 
jldohmann profile image
Jesse

I use Pelican because I'm familiar with Python and the templating engine, Jinja, already from using Flask. I found it mostly painless so far! It's not a flashy choice, but it suits my purposes

Collapse
 
paqman85 profile image
Glenn Paquette • Edited

Oh I would love to keep working in Python! I work a lot with Django and have played in Flask as well. I was looking at Pelican but it didn't seem very active, but the idea of using Jinja sounds amazing... I'll give it a try for sure!

Collapse
 
bayuangora profile image
Bayu Angora • Edited

When I ask them why they chose WordPress, the answers usually boil down to "I want to be able to update the website myself." Well, the reality is that out of the 40 clients I've worked with during the last couple of years, not a single one does their own updates.

Oh, that part is so relatable until this age.

By the way, the most important part about static site generator is how fast they build the site. So, if you have some top candidates, let's compare how fast they build and deploy on real benchmark.

Collapse
 
paqman85 profile image
Glenn Paquette

I can understand what you mean, but even now with everyone in isolation, they call me to update their sites. Most of them are not technical mind you. I find their have good intentions to do their own posts but when it comes to remembering how to log into WordPress and actually finding where to posts, etc... They all get intimidated and just email it to me to take care of it.

Collapse
 
bayuangora profile image
Bayu Angora

I think, comparing how fast static site generator build and deploy in benchmark will get more attention from dynamic based user. Not only about Hugo vs Jekyll. But also another static site generator such Next, Nuxt, Gatsby, Gridsome, Eleventy, etc.

I like this source too ->
willit.build/

Collapse
 
maciejcieslik profile image
Maciej Cieslik

Exactly! Everyone of them wants to update theirs websites, but in the end noone actually do it. I can't convince ppl, that they don't need a cms in 99% of time and that 1% with some news or blog can be done by simple but effective custom cms.

Collapse
 
maymeow profile image
Meow

I asked one client of our company when he wants web page if he will update content on it (if he will be posting new articles and more)... An he tell yes so he wants classic cms even though i told him he will not need it because most of changes of his page was some cnages like new documment (barely 1 time per year - when new year started).

So long story short -> he choose another company which created him new page in wordpress and now its look like before. He changing pages maybe 1 time per year but paying that company because of updates etc... So its hard to convince people that they not need CMS.

Thread Thread
 
paqman85 profile image
Glenn Paquette

Your right, not every client will be convinced. Some of them will be stubborn, and that's ok. I honestly don't want every client that inquires either - I only want to work with great people who trust in my skills and experience. Sounds like your prospect just wanted a robotic "yes sir" and not real advice from a professional. You may have dodged a bullet there. :)

Collapse
 
maciejcieslik profile image
Maciej Cieslik

With pleasure!!!! When someone do a cms for my clients as easy for them as WordPress :/ Developer experience is nothing if your clients aren't happy.

Collapse
 
paqman85 profile image
Glenn Paquette

You bet! In my situation, the clients never user the CMS. So even though they ask for WordPress in the discovery meeting, that have no idea what WordPress is, all they want is a fast website that brings them leads. I update everything anyways, so in the end, they're indifferent. In this scenario, dev experience and site performance are king. :)

Collapse
 
chrisrhymes profile image
C.S. Rhymes

I completely agree. I also wrote an article about the benefits of static sites.

Just like WordPress themes, there are many themes available for Static Site Generators too. Maybe start with a theme and customise it a bit to see how they work and see which templating engine and build workflow you prefer.

I built a Jekyll theme for my own website and decided to open source it so others could use it too.

I've found that Netlify offers a load of services designed for static sites as well.

Collapse
 
paqman85 profile image
Glenn Paquette

Thanks C.S.! I was thinking along the same lines. I've been playing with Hugo today and did just that - loaded a custom theme, added my own content and then edited the theme to make it my own. I learned a lot about how the theme system works and how I could go about building my own. I'd like to incorporate that in the "SSG Saga" - not just an intro to each SSG but also how to edit themes or build your own. I'll try your Jekyll theme when I dive into it!

Collapse
 
mustafaalbazy profile image
Mustafa Albazy

So far I've tried Gatsby, Next and Hugo for my English blog (Arabic blog still running WP).

Gatsby for some reasons were to buggy and sounded more headache compared to WP, so didn't dive deep and skipped it in the early stages of designing.

Next as amazing and so many features for the more demanding sites, plus the server-side thing. But I thought it's too much for my simple blog.

Hugo is the more straightforward for blogs IMO, very simple to setup and manage and update. for beginner web-developer there are a wide variety of ready to use Templates which you can use them as a starting point in the learning process.

I like how simpler it can manages single pages and blog entries.

Collapse
 
Sloan, the sloth mascot
Comment deleted
Collapse
 
paqman85 profile image
Glenn Paquette

Thanks! I'll try it out. :)

Collapse
 
steelwolf180 profile image
Max Ong Zong Bao

I just use GatsbyJS cause it reduces on my cost which I just reinvest the cost saving to get a good email software.

Collapse
 
paqman85 profile image
Glenn Paquette

Awesome! I have Gatsby on the list to try. It seems to be very popular, I'm excited to see what the fuss is about ;)