From WordPress to Gatsby

This site originated on WordPress. I spent several years (from about 2014-2017) blogging about WordPress and creating tutorials for WordPress developers but have since changed focus. Although some tutoraials are a bit out of date the site still gets visits and comments. Unfortuantely though, I hadn’t really kept it up aside form automatic updates, The plugins and theme were my own so there weren’t many issues.

Defining a MVP

As with any Project but especially one done as a side Project, it is important to decide at which point it is ready to launch. As Gatsby is generated at build time we don’t have to worry about too many bugs and security problems but still there is a point which a line should be drawn. In my Case my goal was to have primary urls from my WordPress site accessible in the Gatsby site.

Pain points

  1. Gatsby is not React or Create React App or Next.js or whatever else it resembles. Its fairly easy to get comforatable and to expect to be able to modify the webpack.config or whatever you feel like doing and then to realise you have to figure out how to do it “à la Gatsby”. The good thing is Gatsby has great documentation and, like WordPress, plenty of community responses to whatever question you have. Also, like WordPress, Gatsby uses hooks so is quite easy to customise.

  2. Although not particular to Gatsby, url structure is always a bit of an issue. To avoid ranking problems it is worth creating an table to map existing urls in a WordPress site (there are a lot of them) to the new urls. Netlify has good tools for redirection.

Helpful articles

How to set up import aliases for Gatsby.js