WordPress to Static

Just updated this site to a static version. I vaguely administer a few aging WordPress sites, which are annoyingly high maintenance (that is a lie, they require maintenance, and occasionally get hacked which is not fun at all) and I don’t get paid for this. With some time free this January I dipped back into the world of websites, and did a recce on publishing static sites.

SSGs, ohmy!

For a while I was lost catching up on Static Site Generators (SSG), including Hugo, Hexo, 11ty, Jekyll and Gatsby. I looked into ways to export from WordPress and move to these more elegant solutions. There are several encouraging examples like Tania Rascia converts a WordPress site to Gatsby, or KevQ converting WordPress to Jekyll. I was also a bit taken with the new-old trend toward Markdown flat files, which I adore for being so OG. However any mention of node.js or a link to a gitlab repository makes me shudder. I am lazy, unwilling to learn new things, and I don’t want to get my hands dirty.

I’m looking for something clicky, like a SaaS CMS, or something that I can install locally, publishing to the server. Would be ideal too, if it’s free.[1]

I was quite tempted by the open source project Publii which has Mac, Linux and Windows desktop versions. They include some migration tools for importing WordPress posts. However, Publii uses an SQLite database to store the content, and relies on some kind of custom template framework for design. I felt Publii was conceptually too close to WordPress, and would leave me tethered to a less established product.

Pragmatism won here, the quickest solution might be to run WordPress locally on my Macbook, using a static site plugin to create files which I could sftp to my web server.

And what joy I have found; running WordPress locally on a Mac has never been so easy. There are plenty of bundled applications to get web development going without the command line, but I was particularly taken with the very simple and very green LocalWP.

Going Green

localWP screenshot

If you have a basic understanding of WordPress, it is so easy with LocalWP to either fire up a new site, or import an old one. Everything is handled so that you don’t really need to think very hard, or specify much at all, it just works.

To import an old site, you zip up your wp-content (manually including a database dump .sql file) and drag and drop it onto the application. Then progress bars begin to whizz, and things start happening as you watch. Before you know it, your new site is installed, and you can one-click to the site as a user or as a logged-in admin. So refreshing. All the files too are sensibly assembled in ~username/Local Sites/mysitename/

It even has some kind of push/pull tools for making staged sites live, with something called flywheel (and WP Engine) should you be more of a power user. For a static site, I am content using my existing tools, and running an sftp sync via Transmit.

Machine goes brrr

To make my static HTML website, there are two suggested WordPress plugins Simply Static and WP2Static. Simply Static has more installations and comes up as most popular so I chose that one. Again, accepting the defaults and clicking on the big purple “Generate” button did exactly what I hoped for. It produces a hierarchy of pages that I can sync to my webserver.

Simply Static big purple Generate button

You will lose interactive functionality after the switchover. I’ve lost the search bar, so I removed it from my templates. Should you be arsed, with a little extra extra work you can still have a search facility. Patrick Posner (author/maintainer of Simply Static) lists some search bar workarounds on his site.

Comments will be preserved but cannot be added to without embedding interactive elements from other services. You’ll want to switch commenting for new posts to ‘off’ and bulk edit the older posts to hide the non-functioning form.

The Small Web

During my deep dive, which began on the merits of simpler, lighter, easier to maintain sites, I soon took a left-turn and I discovered pockets of the internet passionate about a return to the homepages of the 90’s.

This included Sadgirl’s internet manifesto, Aral Balkan promoting single tenant websites and Neocities built with a nostalgia for Geocities. Other writers were kinda pissed off like Kev Quirk’s The Web is Fucked who goes as far to suggest old-school bloggers should purposefully include a blogroll again. Hrm.

I think Signal’s Moxie Marlinspike recently made a good point about the reason for the decline of web1 being that “People do not want to run their own servers, and never will” and therefore companies and platforms will spring up to fill that gap. I wouldn’t have a personal, ad-free website if I didn’t a) identify as an early seer of the digital revolution and b) have a friend who donated me space. I think this might be the regret of a lot of early internet nerds, but is not something worth being misty eyed over; we aren’t going back to the days of public access UNIX systems. I share their disappointment but I can’t see a way out of it right now.

This site

Bah, I can’t do web design, no matter how creative I pretend to be. This page then, is then a desire to be dark mode (and who isn’t dark f’king mode in the year 2022?) with a couple of ‘accent colours’ as they say, that uh, looked pretty good to me.

It might change, if I can find a theme I like, ready baked. Until then, I’m still alive, and apparently broadcasting. Hi!

  1. When theregister was still cool, they once linked to triffid.org in an article about freetards. I’ll own it.