Why I finally moved to headless WordPress

Despite the WordPress drama, I’ve still relied on it for many smaller site projects. It’s easy to hand-off to a client and let them host it wherever they want. Sure, I could set them up with a basic SPA or something and host it for free or practically free using a number of different platforms, but even if its just a couple of landing pages and a contact form, they need to be able to make updates, and easily get support in the future. Okay, we need to show them how to edit their pages and make blog posts, check updates, and security logs. Help them delegate access to their marketing partners, etc.

But me, I’m a software engineer. Why would I still be using WordPress for my site? Surely I can craft something lighter, more performant, and better suited to my tastes and preferences.

Was it because I was stuck? Did I build myself into some deep custom theme and plugin situation? Maybe I was just too busy with work, side projects, and other hobbies. Yeah, I could whatever I wanted or needed within the WordPress ecosystem, and I could create blocks and use React or whatever in those. Of course I could. And I still do for clients, but when it comes down to it, why not simplify my workflow to really dig in what I actually enjoy coding. Maybe I’ll admit that I don’t love PHP and that’s okay.

A few years ago you saw a lot more people talking about headless WordPress, and saw hosting providers and companies starting to promote their products that make it easier. I spun up a test site in Local and tried their Atlas solution, or whatever it has been renamed to now that it’s no longer run by Flywheel. (I’m going to look into Faust.js, it does look interesting.)

I’d tested with basic requests to the WP JSON API, got that working on a simple Next.js site, and I was also aware of the GraphQL plugin, which creates an endpoint for much more customizable and dialed in projects. Sure enough, it was pretty easy to start pulling posts into components. I just had to figure out how to pull my custom post types, which also was way easier than I expected. It didn’t take long. It wasn’t hard. Why did I just keep the same old site up using Headed WordPress like it’s 2010 or something.

I don’t know, but I finally got around to committing to making the switch for my own site, even if I had used it before on other projects. I didn’t have a good reason not to.

So what is there to gain? A cleaner, lighter site, fully built to your own specifications. Avoiding a lot of the typical set up headaches that come with all of the legacy code of WordPress. There’s so many things to turn off and tweak and tune up. I love doing it too, but for now, I’m trying out something different. Even if I am late to the game.

So where does that leave us now? I’m starting my blog over fresh. I’m using Next.js for the front end. It’s pretty chill.

Back