Hacking with WordPress

A lot of developers make their start with WordPress, hacking things together with PHP, CSS and JavaScript, and are very excited to move on to other software stacks. I’ve gone the long way around, spent a smattering of time with .NET and Umbraco, and the last couple of years writing Python, primarily working in Flask, with some Django for the main website at work.

WordPress is incredibly difficult to ignore, and I’ve found myself looking over the fence fondly for the past couple of years at all the marvelous work going on in the WP community. Progress on the Medium-style Gutenberg editor has been exciting to watch, and I eventually realised that I’d spent so much time watching from afar, and nowhere near enough time jumping in and having a play with all the toys.

I started listening to Shop Talk Show last week, the front end design & development podcast with Dave Rupert and Chris Coyier. After listening to their episode with Tammie Lister and Matias Ventura from Automattic talking about progress on the Gutenberg editor, I decided to finally take Gutenberg for a spin on a public-facing website, outside of my endless testing environments. I’ve really fallen for the Shop Talk Show mantra of “just build websites” and not overthinking things.

Last year I made a first pass of spinning up a WordPress site for this blog, and fell down a rabbit hole of using Bedrock and Trellis, the very clever opinionated approaches for deploying WP sites using Composer, and Ansible for server configuration. At the surface, this sounded like a great way to modernise the WordPress stack, and turn it into something with a more structured DevOps approach. But I never really got a handle on using it.

The thing is, when you work full-time as a developer, the last thing you really want to be doing in your spare time is mess around with DevOps workflows. It’s way more fun to spend time making things.

Tonight I spent an hour with the Digital Ocean docs, spun up a 1-click WordPress install, added Lets Encrypt for SSL, popped my theme I’d been working on last year into its own Github repo, logged into the server via SSH, and cloned the Git repo into the wp-content/themes directory. ‘Deploying’ updates to the theme will be a matter of SSHing in to the server and running git pull. Sure, there are heaps of ways to ‘improve’ this, but for hobby projects, there’s a fine-line between automating something to make it easier, and automating something so that you’re spending all your time fixing the automation. And even when something is working smoothly, I hate the nagging feeling that you don’t quite understand the build pipeline, and if something were to go wrong, you wouldn’t know how to fix it.

So here we are, a simple WordPress site, no Docker, no fancy build tools, just a one-click install from Digital Ocean, and I’m editing this on the Gutenberg beta plugin. There’s apparently been quite a bit of controversy in the WordPress community over the new editor (which makes sense, there are millions of WordPress users and it’s a big change!) But for an outsider, the editor feels so fresh and fun to write in, and it’s made me excited again to spend a bit of time hacking on a personal site.