Netlify WordPress and Gatsby Local Development

Hi all -

I’m trying to use Gatsby with WordPress on Netlify, starting locally. The trouble is, when I start my development server, I get Error #11321 - property ‘data’ of undefined and Graphql does not find the WordPress plug-in correctly. Researching this, it seems the likely culprit is not correctly defining the base URL in gatsby config.

I’ve tried all sorts of things at this point. Is there a simple answer to this?

My training site Name is: gatsby-portfolio
Site domain is: gatsbyportfolio.local
Site path is: ~\Local Sites\gatsbyportfolio
(According to netflify)

To that end, in gatsby-config, I went with something like this as my latest attempt: (to no avail)

resolve: "gatsby-source-wordpress",
      options: {
                   baseUrl: "http://localhost:8000/gatsbyportfolio.local",
                  protocol: "http",
                   hostingWPCOM: false,
                    useACF: true,


Have you looked into the WordPress Source Plugin Tutorial made by the fine folks at Gatsby?
If you still struggle with this issue you can check the source code of the plugin here but it’s probably faster for you to ask these questions on Gatsby’s Discord channel

1 Like