This page has moved to the Gatsby monorepo!
Hi there! 👋 thank you so much for being a beta/alpha tester of this plugin! You've helped us bring a much more stable WordPress integration to Gatsby and we're very thankful for that!
We've shipped this plugin as gatsby-source-wordpress@4.0.0
.
gatsby-source-wordpress-experimental
is now deprecated.
Please upgrade by npm/yarn installing the latest version of the stable plugin and updating your gatsby-config.js to include the stable plugin name.
We've chosen this point to release this plugin as a stable release not because there are no bugs (all software has some bugs), but because this plugin is far more stable than the last major version of gatsby-source-wordpress
.
Note that we will continue fixing Github issues you've opened in the -experimental repo - those are not forgotten and will be transferred to the Gatsby monorepo.
Thank you! 💜
If you've had previous experience with Gatsby or you like to move fast, you can use the quick start steps below to get up and running quickly. If you'd like to take a step back and learn more first, head over to our tutorials 👣
-
Install a starter
gatsby new my-wordpress-gatsby-site https://github.com/gatsbyjs/gatsby-starter-wordpress-blog
-
Install and activate both of the following plugins in a live WordPress instance.
-
In the
gatsby-config.js
of the starter you just set up, update the plugin options forgatsby-source-wordpress-experimental
. Change theurl
option so that it points to your WordPress instance GraphQL url. This should be the full url of your GraphQL endpoint. Eghttps://yoursite.com/graphql
-
Run
gatsby develop
and experience the magic 🌟 -
Create your beautiful and accessible app 💅
-
Build with Gatsby Cloud & deploy to Netlify for a fast, wonderful, and affordable CI/CD experience 💥 🚀
For a fast, easy, and reliable WordPress local dev server, use Local by Flywheel. This will save you time setting up WordPress on your computer and you can easily push and pull to and from Flywheel/WPEngine hosting!
In addition to WordPress, there are 2 other required plugins on the PHP side of things. If you're on the latest version of the source plugin and these plugins, everything will work great. If there is a version mismatch, you'll be notified and provided a download link for the correct versions in your terminal via our compatibility API when you run a build 😄
This plugin turns your WordPress instance into a GraphQL server.
This plugin modifies the WPGraphQL schema in Gatsby-specific ways and also keeps a record of when user actions happened. This allows us to do selective cache invalidation in Gatsby (to speed up builds) and add Preview support.
Please note that we only officially support the latest version of WordPress. However, WordPress is great at keeping backwards compatibility and older versions may work.