{"id":316865,"date":"2020-07-13T07:32:36","date_gmt":"2020-07-13T14:32:36","guid":{"rendered":"https:\/\/css-tricks.com\/?p=316865"},"modified":"2020-07-13T07:32:37","modified_gmt":"2020-07-13T14:32:37","slug":"introducing-headless-wordpress-with-gatsby-cloud-live-preview-incremental-builds-and-more","status":"publish","type":"post","link":"https:\/\/css-tricks.com\/introducing-headless-wordpress-with-gatsby-cloud-live-preview-incremental-builds-and-more\/","title":{"rendered":"Introducing Headless WordPress with Gatsby Cloud (Live Preview, Incremental Builds, and more!)"},"content":{"rendered":"\n

The Gatsby team shipped an update to its source plugin for WordPress<\/a>, graduating it to a beta release. The new version brings a new set of features to Gatsby’s headless WordPress<\/a> configuration, which brings together WPGraphQL<\/a> and WPGatsby<\/a> to power a Gatsby front-end that pulls in data from WordPress.<\/p>\n\n\n\n

If you haven’t encountered these plugins before, that’s probably because they’re only available on GitHub rather than the WordPress Plugin Directory.<\/p>\n\n\n\n

And if you’re wondering what the big deal is, then you’re in for a treat because this may very well be the most straightforward path to using React with WordPress. WPGraphQL turns WordPress into a GraphQL API server, providing an endpoint to access WordPress data. WPGatsby optimizes WordPress data to conform to Gatsby schema. Now, with the latest version of gatsby-source-wordpress@v4<\/a>, not only is the GraphQL schema merged with Gatsby schema, but Gatsby Cloud is tossed into the mix.<\/p>\n\n\n\n\n\n\n\n

That last bit is the magic. Since the plugin is able to cache data to Gatsby’s node cache, it introduces some pretty impressive features that make writing content and deploying changes so dang nice via Gatsby Cloud. I’ll just lift the feature list from the announcement:<\/p>\n\n\n\n