Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

egghead.io

WordPress as a Headless Content Management System (CMS) and GraphQL API

via egghead.io

Overview

WordPress has been around for a long time and powers a huge number of sites.
Just because WordPress isn't brand new doesn't mean it can't get the job done!
Running WordPress as a Headless CMS gives you the benefit of a great content creation experience on the back end with the powerful Gutenberg editor while allowing you to use a modern JavaScript framework on the front-end.
In this course, Kevin Cunningham will guide you through setting up WordPress as a headless CMS from scratch, as well as migrating from an existing WP site. You'll get practice with different WordPress content types, implement a GraphQL endpoint for querying data, and backup & deploy your site. All the while, you'll deepen your understanding of how headless WordPress approaches the relationship between content & rendering.
Using WordPress as a headless CMS turns it into a datasource ready to work with Gatsby, Next.js, or whatever else you want to build with. Your and your clients will be able to take advantage of WordPress's content editing experience, without having to settle for a cookie-cutter theme on the frontend.
With WordPress being decoupled from the rendered site, the database isn't hit for every request. This means faster performance and more security against WordPress exploits. You don't even have to host the editor at the same domain as the published site.
While watching, consider...
What are the tradeoffs of using a CMS for a site?
Would headless WordPress work for me or my clients in this scenario?

Syllabus

  • Configure and Start a WordPress Instance using Local
  • Explore Pages, Tags, and Taxonomies in the WordPress JSON Route
  • Create and Explore a Single WordPress Post Through Gutenberg and the REST API
  • Extend a WordPress REST API to Register a Comments field on the Post GET API
  • Challenge: Extend the REST API
  • Add a Custom Post Type in WordPress with the CPT UI Plugin
  • Compare the Gutenberg Editing Experience with the Resulting REST API Structure
  • Expose Gutenberg Blocks to the REST API with the wp-rest-blocks Plugin
  • Filter Blocks Types that are Exposed in Gutenberg for a Predictable Headless WordPress API
  • Add the Advanced Custom Fields (ACF) Plugin and Expose those Fields to the REST API
  • Write Markdown Posts in WordPress with the WordPress Markdown Editor Plugin
  • Create and Test a GraphQL Endpoint for WordPress with wp-graphql
  • Add a Custom Post Type to the GraphQL Headless WordPress API Endpoint
  • Expose Gutenberg Blocks to the Headless WordPress GraphQL Endpoint
  • Expose WordPress Advanced Custom Field (ACF) Plugin Data to the GraphQL Endpoint
  • Build a GraphQL Query with Exactly the Data you need for a Posts Page
  • Add Fake Data to a WordPress Instance with the Faker Press Plugin
  • Backup Your Content and Custom App Logic in a WordPress Instance
  • Replicate a Remote WordPress Site Locally by Importing Content and Logic
  • Add Comments to a Headless WordPress Post using Application Passwords
  • Manage Media Assets in a Headless WordPress Site using the Cloudinary WordPress Plugin

Taught by

Kevin Cunningham

Reviews

4.4 rating at egghead.io based on 29 ratings

Start your review of WordPress as a Headless Content Management System (CMS) and GraphQL API

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.