6 ms·
WordPress has many problems with the way it's usually used that you don't get with static site generators though: - WordPress can be auto-updating but when you
by seanwilson 5y ago
WordPress has many problems with the way it's usually used that you don't get with static site generators though:
- WordPress can be auto-updating but when you update the core files, theme, and plugins, and want to upgrade PHP, there's lots of incompatibilities that can take your site down and cause other problems so it's not set and forget.
- Most sites also require a combo of plugins because core is missing essentials (e.g. page caching, SEO tags, contact forms, image optimisation), where each can give page speed, security, and maintenance issues.
- Dynamic PHP code is inherently less secure than static HTML files e.g. there's been remote code execution exploits via WordPress contact form and caching plugins in the past which isn't something you have to worry about with static sites.
- Versioning, deploys and updates via Git and CI/CD isn't standard practice with the WordPress community either. Plugins that update themselves and write files to the server is the norm which is another source of stability and security problems.
- Configuration being split across the filesystem and the database gets in the way of predictable staging/production deploys and QA.
- When writing PHP theme templates, there's minimal default escaping when you output fields so you have to be extra careful to not introduce exploits.
Static sites are fundamentally more secure, more performant and easier to test by default. There's bandaids to some of the above but you'll be fighting against WordPress standard practices all the time.
I'm still trying to find a good open source WYSIWYG page builder experience here that can compete with WordPress though. Using WordPress as a CMS and a static site generator to deploy it is an option though.
- unfocussed_mike 5y ago> Static sites are fundamentally more secure and more performant by default. I'm afraid to say I consider "performant" to be a term almost without meaning, but especially here where you just mean "faster". Any true comparison of performance would have to address the functional things that WP can do that a static generated site cannot do without third party services or serverless functions etc.
- seanwilson 5y agoI mean page speed, like what Google Lighthouse gives you a rating for. Optimising WordPress for this is much more challenging than static pages in my experience. What functionality are you thinking about here? I find most business websites don't need much beyond static HTML contact forms, nothing that would need serverless functions. A themed search page is a bit more challenging but you can embed Google Search or something like Algolia. Messaging widgets, analytics are usually JavaScript snippets, same with a lot of buy-button functionality.
- unfocussed_mike 5y agoHow does your contact form work without backend code? For me the primary benefit of a contact form is obscuring its destination (or piping it into a CRM or ticket system). Search is important. But other functionality includes things like content embargo/scheduled publication. Or multi-author systems, where not everyone who is writing the content should be doing any damn thing with CLI tools or Git or any such thing), and where there might be editorial approval before it is posted. Analytics: again, this is something that I personally believe should be achieved in aggregate on the server side, not in JS trackers. Most simple business brochure sites do not need much, but most simple business users like a control panel they can log in to. I do not have _any_ customers I'd deploy a static site generator to. It's just not going to happen without an online frontend (or something like Publii, maybe).
- indigodaddy 5y agoAren’t contact forms easily integrated with tools like Netlify functions or AWS Lambdas (which I believe Netlify functions utilize unless they have their own thing now).. ?
- unfocussed_mike 5y agoThey can be integrated with those things. But how many developers do you know outside of your own work team who know how to install an AWS Lambda function? I've been developing a long time and I have Lambda functions in production but the entire process makes me want to bash my head against the wall to the point of unconsciousness. The idea that we can write off wordpress as bad in one breath and then recommend a "static" site system which is a bunch of HTML pages with a set of specific third party hosting dependencies has always struck me as interesting. JAMstack is a manifesto for dependency on subscription microservice providers.
- unfocussed_mike 5y agoSeparately: > I'm still trying to find a good open source WYSIWYG page builder experience here that can compete with WordPress though. I would be interested to see a static CMS that worked more this way -- Publii is interesting for this though. > Using WordPress as a CMS and a static site generator to deploy it is an option though. This definitely can be done, and you could use e.g. the Atlas content modeller plugin and GraphQL and then Gatsby/Gridsome. But it is more work in search of a reason to do it.
- indigodaddy 5y agoI’m not the author of this and have yet to try it (but I’m going to soon), but it really looks cool and I’ve been looking for something like this for awhile.. I like the fact that because he has it hosted on Replit (believe he has CF in front), he can either edit md files within the Replit UI, or from edit mode within his webui. Neat stuff imo. https://youtu.be/3qFqnuqIcm8 https://youtu.be/3qFqnuqIcm8 https://github.com/splch/slc.is https://github.com/splch/slc.is https://replit.com/@splch/slcis https://replit.com/@splch/slcis
- unfocussed_mike 5y agoYou can do something similar in Nuxt projects, with Nuxt Content: https://content.nuxtjs.org/ https://content.nuxtjs.org/
- indigodaddy 5y agoVery interesting I’ll check this out as well, thanks.
- marc_io 5y agoUnfortunately, there is no real page building functionality in Publii. There is not even the possibility to create pages. So it's not a real WordPress competitor in this regard.
- unfocussed_mike 5y agoYes -- this is the most striking limitation I've found. You really do have to build your site out of the blog content itself. Maybe that is increasingly a distinction without a difference, though; lots of blogs are now removing their date-oriented URLs (more's the pity)