Alex Young, creator of the WPCasts video tutorials site, has published a free crash course that offers a brief introduction to using WordPress as a headless CMS. The 28-minute tutorial covers the basics of setting up a bare bones React application that uses WPGraphQL to query ACF data.
Young begins by installing four plugins: WPGraphQL, WPGraphiQL, Advanced Custom Fields, and WPGraphQL for ACF. He demonstrates how to use WPGraphiQL, which provides a GraphiQL IDE inside the WordPress admin, to test GraphQL queries before adding them to the app and check to ensure ACF data is being queried.
Young gave a walkthrough of installing Create React App to quickly get a simple app up and running. When asked on Reddit why he didn’t use Next.js or Gatsby, he said he just wanted to present the concept with something that might already be familiar to developers.
“If I were going to launch this into production I would use Gatsby,” he said. “In this tutorial I used CRA since it’s a very simple install and I figured most people have used it before. I’ll eventually do a more in-depth and real-world example in the future. But I hope this video helps people understand the basic concept of using WP as a Headless CMS.”
Young has produced 18 videos since launching WPCasts on YouTube in March 2019. Although the channel has a corresponding website with more videos available for monthly and yearly subscribers, Young said he thinks it is important to release some introductory content for free.
“I am a self-taught developer who relied heavily on YouTube, blogs, and individual developers creating free learning material (Chris Coyier, Wes Bos, etc.),” he said. “So by creating free content, I feel like I can help developers who are just starting out and need those resources just like I did.”
Young’s day job at Clearlink involves managing about approximately 20 WordPress sites with different purposes and features. He said he hopes to move these sites to a headless setup over the next few years.
His WPCasts project is still very new but Young said he has received helpful feedback from the community that he is incorporating into future videos. The headless WordPress crash course tutorial seemed to hit at the right time when these setups are gaining popularity. His tutorial has been enthusiastically received, passing 600 views on YouTube in less than 24 hours.
“I feel like Headless WordPress is the future of WP development,” Young said. “With powerful frameworks like Gatsby and Next, we have the best of both worlds – a fast and extendible frontend, and a CMS that has proven itself year after year.
“With tools like WPGraphQL, ACF, and others, WordPress will be my tool of choice for the foreseeable future. I hope that the tutorials I’ve made and future tutorials will help others see the power of WordPress and break the misconception that WordPress is ‘just a blogging platform.’”