WP-CLI » WordPress to Gatsby on netlify ☄️

WordPress to Gatsby on netlify ☄️

When migrating from WordPress CMS to another CMS there are a couple of ways to easily export all your posts and media files:

In this guide we will be using the WPGraphQL plugin and Netlify to deploy a Gatsby website.


Step 1. Fork the gatsbyjs/gatsby-starter-wordpress-blog repo on Github

image 32 1024x695 - WordPress to Gatsby on netlify ☄️

Step 2. Edit the gatsby-config.js file and under gatsby-source-wordpress change the url option so that it points to your WordPress instance GraphQL url. E.g. https://yoursite.com/graphql

image 30 - WordPress to Gatsby on netlify ☄️

Step 3. Install WordPress plugins

Install and activate both of the following plugins in a live WordPress instance.

image 31 - WordPress to Gatsby on netlify ☄️

Step 4. Create a netlify account, connect Github account and deploy from the newly created repo

image 36 1024x655 - WordPress to Gatsby on netlify ☄️
image 37 1024x874 - WordPress to Gatsby on netlify ☄️

That’s it, go ahead and check your new Gatsby website on netlify.

image 35 - WordPress to Gatsby on netlify ☄️

Troubleshooting common problems:

make sure your image names are not too long:

image 34 1024x523 - WordPress to Gatsby on netlify ☄️

and .htaccess is not limiting access

image 33 - WordPress to Gatsby on netlify ☄️

Was this post helpful?

Leave a Comment

I enjoy constructive responses and professional comments to my posts, and invite anyone to comment or link to my site.

Recommended