Go Back

Headless WordPress – moved from WordPress.com

Posted: 

It was a great exercise using a WordPress.com free site to provide content to my personal site that is built using NextJS. It worked well for what I wanted to prototype and cost $0 for WordPress hosting.

However, I ran into some limitations that I'm now ready to try and tackle. This required me to have my own install of WordPress that I could customize with plugins and custom code.

I chose Hetzner as a host because I could get a basic WordPress site up and running for under $3/month. Since WordPress is only used to pull data from during the build, performance is not an issue.

Reasons

There are a couple reasons for making this move.

Custom plugins

The WordPress.com free account doesn't allow me to use any custom plugins. Granted they have a lot of options, but I want to get into some more complex flows.

For instance I want to try with GraphQL. I just installed WPGraphQL in my local WordPress instance and was impressed with how accessible all my WordPress data was. No shade on the WordPress REST API, but having it be self-documenting goes a long way.

No frontend

With WordPress.com they obviously don't expect you to want to turn off the frontend. I was finding that my WordPress.com instance of my site was being crawled by Google as well. This can result in Google recognizing the duplicate content and penalizing my ranking.

I'm trying out the plugin Headless Mode. Essentially it just turns off the frontend of the site and forwards to a url of your choice. It leaves wp-admin, the REST API and WPGraphQL if applicable. Seeing that Jason Bahl, one of the core maintainers of WPGraphQL build this plugin it seemed like a good choice. So far it works great.

Writing experience

One of the main reasons I chose WordPress over something like markup is the writing experience. I really love the WordPress writing experience. Blocks are the most intuitive methodology for my brain and provide a lot of options when pushing to a headless NextJS site.

Now that I can add plugins and customize this experience more, I'm hoping it will smooth over any resistance I have to writing more.

Hackability

I don't plan on cutting up WordPress to much, but it is helpful to be able to add something to functions.php or just generally have access to the theme code.

We'll see!

I'll keep you posted on how it goes but I think this is the right next move.