logoalt Hacker News

xp84today at 2:44 AM12 repliesview on HN

SSGs versus Wordpress is surprisingly still a battle… I’m genuinely shocked at the number of sites on the Net that use Wordpress, dynamically assembling markup with PHP for every page view, risking constant hacking and stuff, when they have a total of like 7 or 100 pages, which could all be pre-rendered to HTML files in roughly 8 seconds on even a junky laptop or X-small ec2 instance. It really is okay.

For those who post regular updates on those sites, there are great and cheap WP plugins that export the whole site as static to something like FTP or S3, so you can just firewall the actual WP behind an IP restriction and host the actual public-facing site from S3/whatever.


Replies

yallpendantoolstoday at 4:57 AM

Is there a tenable workflow for the marketing department to use a SSG over Wordpress?

- WYSIWYG editor is table stakes. The lovely folks at marketing once thought I was hacking when I `ps -eaf`-ed in an unresponsive Macbook.

- They "put" images in their post. They don't "upload the image and position it with CSS".

- It's the marketing department so they have to have all sorts of bells and whistles. At the very least tracking, at most some obscure integration plug-in that as an engineer I have no kind words for. Social integrations and "You may also like..." sections also come to mind.

> cheap WP plugins that export the whole site as static to something like FTP or S3, so you can just firewall the actual WP behind an IP restriction and host the actual public-facing site from S3/whatever.

Not that I have extensive WP experience but unless you can name me an actual plugin that has good street cred for being used in the wild wild west, I'm gonna say this is not as easy as you make it sound. For one you just described a very rudimentary data pipeline which someone has to support and maintain even infrequently. Also, speaking from experience, plugins don't always play nice with other plugins. I once tried to export my very basic personal site out of WP to find the footnotes all messed up (I don't know now but back then I handled footnotes with a plugin).

show 2 replies
evaneliastoday at 3:57 AM

Ironically, one of the original major reasons WordPress became popular was its dynamic nature. It dethroned Movable Type, which was an extremely powerful and extensible static site generator.

It's wild to me that this post's timeline makes no mention whatsoever of Movable Type, and at one point it links to another author's post titled "A Complete History of Static: The Beginning to WordPress Headless" which also makes no mention whatsoever of Movable Type. Now I feel old :/

show 1 reply
azangrutoday at 1:29 PM

> I’m genuinely shocked at the number of sites on the Net that use Wordpress, dynamically assembling markup with PHP for every page view,

What puzzles me about static sites (and I do build them) is how everything gets to be regenerated, even though you update only one file.

Now, imagine that your writing patten is small notes, like on twitter, mastodon, or bluesky. Over time, with this pattern, you will end up with thousands of notes. Is each one deserving of a page? Ideally, yes; because they should be linkable. Does it make sense to regenerate thousands of pages every time you add a note? Dunno.

Then, consider all the aggregation pages. For example, a paginated list of all my notes. Or a paginated list of notes distributed by different categories / tags. How many more pages does this create?

And the static assets that all get to be copied from source to output directory at every build.

And of course, comments. Static sites don't have comments.

I don't know. I think someone who invested into building their own site engines, like Jeremy Keith (https://adactio.com/) have it the best.

teekerttoday at 5:20 AM

I started my client's site on Hugo, withing 2 days I was editing something for them every 30 mins (slight exaggeration). They wanted something they could edit, they don't do Markdown, they don't manually write URLs they want to drag images into their posts and pages.

So bye bye Hugo.

show 3 replies
faangguyindiatoday at 4:15 AM

I recently moved all my website from WordPress. In last few year couple of them had got hacked via plugin exploits as well. I had to use "security" plugins after that i didn't have any issue but still...

I crawled own website and downloaded each, and converted to markdown then used static site generator (custom in javascript)

runs on cloudflare pages for free with no downtimes or "fee".

if you want to see result: https://aretecodex.pages.dev/guides/recomposition

Couple of problems:

To edit content i've to use "image paste" plugin and configure its base directory, image path in project setting in .vscode

I lost the comment/upvote feature.

I lost "search"

mooredstoday at 3:30 AM

Wordpress has:

* the ability to schedule posts

* a ton of plugins

* a lot of people who know how to use it

* a reasonable WYSIWYG interface

As far as I know, most SSGs fall down on one or more of those dimensions.

show 2 replies
skyberrystoday at 5:56 AM

Switching from word press to static site generator caused disruption to my autoflow habit of posting. WordPress (I didn't have to maintain) had a gui I didn't have to think to use. I still made the switch though.

CJeffersontoday at 4:54 AM

To me, the thing wordpress installs offer is the GUI. I help a few people with wordpress installs, and I've ended up setting up a private wordpress install, and then I run a script which mirrors the website statically -- this is moderately hacky, and I'm sure could be done better, but as long as I hide the private wordpress install, it means I don't need to worry about keeping it up to date.

I haven't found a static generator which has as nice a WYSIWYG interface as wordpress.

nabeardstoday at 5:26 AM

For those looking for an SSG with WYSIWYG, please take a look at Publii. I have no affiliation other than being a user, but I wish more people were aware of it.

show 1 reply
nedttoday at 9:28 AM

Wordpress can be part of a SSG setup - it's not versus.

nchmytoday at 4:57 AM

have you ever heard of caching? because it can do the exact same thing as what you just described, yet WP can also be dynamic, have visual page and post builders, etc...

busterarmtoday at 4:32 AM

The WordPress hacking/plugin security issue has been a solved problem for well over 10 years now if you're even basically competent. Especially if you're using something like WP Engine or Pantheon for hosting.

show 1 reply