Moving Blog Post control to WordPress using WordPress GraphQL and WordPress Gatsby

Viet Nguyen
Aug 28, 2022

With many years of development specially in blog site, it is no doubt that WordPress has more advantages than any others Content Management System platform. That is why I had come back to it to build my blog folio.

WordPress console

With WordPress, it is kind of easy for us to create a blog site promptly. I will go through my process briefly to let you guys know how to create WordPress CMS for blog content. Everything seems good, but the most difficult thing to me is purchasing a domain name and a year of hosting server.

About setting up: You just need to set up a domain, server, then pick a template, write blog posts and . . . voila! you will have the most simple website to show to the world.

Besides, WordPress provides you many functions to edit the template, so if you aren’t happy with any of those, feel free to modify them without touching the code base. And even though you want to dig deeper and change everything, WordPress still allow you to work with it source codes or create a new theme follow your desire. Sound good?.

Other than that, some of nice functionalities which I like the most from WordPress are: ease of edit posts, admin console, users and author control, themes and plugins supported.

You can you an application name Local (which is pretty good in my opinion). But if you want to deploy it from the app directly, there are only 2 options which is not cheap at all.

– author Viet 🙂

But, there is a big ‘but’ for me: that WordPress is written in PHP, which is quite not interesting to me 🥲.

I have tried to modify the CSS field only, did not touch the PHP part but seems that you will need days to learn the architecture plus the language if you have not know before.

So, I have a solution!

I have used the content and data from WordPress and transferred to my personal site written in GatsbyJS and ReactJS (btw, thanks to WP that they are quite supportive about importing and exporting data from the platform 🥰).

First, you need gatsby-source-wordpress plugin in your Gatsby project

Then, you will need WP GraphQL and WP Gatsby plugins in your WordPress instance site

After that, make sure you pay for the hosting service to have a slot/a backend with SQL database supported (I have looking for a while all over free platform but it seems no hope 🥲).

Finally, you can get the data from graphql query like other CMSs out there!

PS: this will be an announcement for my personal site version 2.0.0 as well. In this update, I also change in Blog UI and add Tags to the posts. Next update will be refactoring and redesigning a little bit to Blog site.


There is no comment here yet. Let's have one! ⌨️
Leave a Reply
Please be responsible and respectful when commenting. I reserve the right to remove any comment that I feel is inappropriate.