We've all experienced it.
Websites suddenly becoming slow for no reason, loading times in the double digits, or even the dreaded "Error establishi...
For further actions, you may consider blocking this person and/or reporting abuse
I am confused, did I miss the part where you simply cache pages on WordPress so you don’t hit the database?
I mean they even make the plugins for page caching “non tech” friendly, unlike SSGs.
I mean that is the whole argument for a static site generator presented here, that you are serving static files?
Other than cost, which is a valid reason for micro sites, distribution to CDNs and not needing a database are the big winds for SSG surely?
Don’t get me wrong I am not a fan of WordPress but I have seen it run sites that have thousands of visitors on modest hardware.
Wordpress sites are slow due to crappy plugin choices, bloated themes etc. It is not WP itself that is slow and trust me I have seen enough sites on SSG be slow as well as the front end tends to be the bottleneck.
Yeah, but I sort of feel that caching is like dealing with the symptoms of the problem instead of the underlying problem (if that makes sense). I do agree with the fact that SSGs are not for everyone, but developers might work better with them than WordPress
A static site generator is literally a site like wordpress but with an extra build step. Wordpress + caching takes that build step away.
If you ignore all the problems with WordPress, then yeah.
I hear you on that. Jamstack is missing the great user experience that WordPress enjoy in exange for developer's experience. Headless CMSs are closing the gap, but there's still a big gap there. Especially in regards of dynamic data rendering. On the other hand, I sees amazing possibilities from decoupling the front-end from the data/API. This is where I'm investing and I feel there is so much that remains to be seen in that area.
The problem is that a major cache plug-in for WP just released an update with a bug that broke caching in an impossible to debug manner. This just isn't an issue with SSGs. Plus there are plugin vulnerabilities, etc.
That still isn't a WordPress problem as per my first answer.
It is a plugin problem and SSGs will suffer a similar fate with broken plugins as they gain popularity and people with less experience start developing with them.
As for plugin vulnerabilities, SSGs use plugins too and most are served via something like npm (which can be an additional vulnerability as people just blindly trust packages).
Yet again I would stress I am not a fan of WordPress but none of the issues are an issue with WordPress itself and SSGs are far from immune, they are just not widely used enough to justify the effort of attacking them (yet).
I understand what you're saying, and WP isn't inherently bad.
There is something different about the dependencies, though. WP plug-ins are code running on your production server. That is inherently more dangerous (to my server) than an npm script that runs in the browser, or a plugin that emits static HTML code that I upload to S3. The npm script can't bork my production DB and take down my site because there isn't a production DB (speaking strictly about page/article content).
All valid points and I am playing devils advocate in all of this as I actually like SSGs, I am in the middle of working on a hybrid system as we speak.
Just sticking up for poor old WordPress (poor thing with its dominant market share 😂😂).
I just made a bunch of arguments against WP to the marketing department and inadvertently made a new project for my team to redo the site with an SSG. Maybe I'll tell them you said it's not so bad 🤣🤣
I chose to move from Wordpress to SSG (using two CMS approaches: NetlifyCMS or raw Markdown in git for my own site; offline Wordpress and an SSG plugin for a friend who likes WP), primarily for: cost reduction - CDN hosting is massively (1000+ times) cheaper than a VM; security posture improvement (a cloud company problem, not mine now); lower operational hassle (no more patching, DB backups, etc.)
How would you cache a shopping cart website with many pages and components changing all the time?
And how would you manage the same with a SSG?
There are fragment caches, object caches, partial page caches etc.
SSG doesn't need caching. WordPress plugins like WP Super Cache would generate static HTML files but those are basically just snapshots of dynamic WP pages. It's very difficult to manage that if your site is dynamic. You would need to re-generate those snapshots quite often
Yeah it's true you could achieve that with something like fragment caches. But honestly it seems to be a lot of work and I'm not sure if it's worth it. As someone said above it's dealing with the symptoms of the problem instead of the actual problem
"No-one" is talking about one of the biggest and most mainstream trends in web development over the last several years?
My exact same thought 😂
Funny because static site generation was the first big trend on the web back in the mid 90s.
It was abandoned for more complex stuff and because of improving code stacks. But it's still a very valid strategy where it can work and for very heavily hit sites.
You can even make it work with comment sections. (Slashdot for the longest time statically generated their site)
What you do is take in comments, but don't show them till some time passes and your site is regenerated. The advantage of that approach is that the site is always up, and site generation is independent of current load.. if it takes longer.. oh well.. so be it.. but the site is still up).
😂😂I'll be more careful with my titles next time
React: Gatsby, Next.js
Vue.js: Nuxs.js
Used all of those frameworks for SSG with Wordpress, Contentful or Strapi as a back-end. It's totally worth learning.
Let me tell you my story of SSG, I have chosen Jekyll with GitHub pages 3 years back. I used to write Markdown in my local machine, then used to push code to GitHub pages. Then sometimes, I wanted to write a blog post but I wasn't on my development machine. Now I use some Static CMS to tackle this.
Conclusion is, SSG softwares aren't popular because they are currently targetted to developers only.
It's good to list simple ones. And then there's this one github.com/sake92/hepek. I like going a bit outside of popular and try to research really unknown. But to be honest in this case it's a friend who started it. Cool thing in here for me is that it's mostly developer oriented so you I guess it might be easier then learning some markup language or so.
Ive configured wordpress websites to load in less than a second with assets it is easy to tweak there are even plugins who help you do auto minify and file concatanation. Database connection also comes from poorly designed network if you make sure your database is on same server or same country you wont get that issue unless you host is down but then that would also be an issue for static websites.
Then lets talk plugins wordpress being there and established for so long you have huge plugins like WooCommerce that let you start e-commerce websites very easily and configure everything in real time.
And I disagree a lot of people are using static site generator but usually for portfolios and more. Also take time into consideration. If im someone not tech savy and just want a small website for my business with Wordpress you signup, configure and in 5 minutes you are up and running.
They target different audience and different needs.
Really nice post. I also setup my blog with a static page generator. I use Pelican, because I like Python. In my last post I explain how I publish it with Jenkins.
Have you ever made a site with Hugo?
No, I've only used GatsbyJS.
I don't think you need to know Go to use Hugo.
My personal site is built with Hugo, you do need to learn their Markdown extension syntax if you want useful things like automatic linking between pages, or writing your own macros.. but you definitely don't need any Go skills.
I think the headline is misleading.
I'm not a big fan of Wordpress to be honest but it serves a completely different purpose and is a completely different tool. SSGs can be used to create websites for yourself as a developer, for other developers (and can be hosted on a platform like GitHub so others can easily contribute) or in combination with a CMS. A CMS on the other hand can be used for and sometimes even from non-technical folks like clients and you host them easily on shared hosting.
I am using hugo for:
I like it very much! Kudos to the Development Team!
Go Gridsome. Use Wordpress for content management (if you reeaaly have to) and publish static website!
If tailwind css is a option primo.af is a nice static site generator cms.
Another source to know more about static site generators: devopedia.org/static-site-generators
I recently wrote a post on the similar topic - abhinav.co/static-websites
I recommend t3mpl.n4no.com/ It's similar to Jekyll, but it needs only browser (or CLI).
epsi-rns.gitlab.io/ssg/2020/10/11/...
Nice Article, very helpful, Keep going !