Gatsby WP Themes Documentation
Deploying your site
Deploying your site
The Gatsby documentation explains in details the deployment process. You will find there a variety of possibilities.
You should definitely consider deploying on Gatsby Cloud, the cloud platform specifically built by Gatsby for the Gatsby framework.
Right below, we will describe step-by-step the deployment process on Gatsby Cloud and Netlify.
In both cases you need to have a remote repository for your project. Your repository can be private or public. We'll use GitHub here.

✅ Given that our starters require
yarn
to work, make sure to haveyarn.lock
in your starter's GitHub repository. Theyarn.lock
file is automatically added when you first install your dependencies with theyarn
command.
Deploying on Gatsby Cloud
Sign-up to Gatsby Cloud with your GitHub account.
Click the Add a site + button on your Dashboard.
Choose the Import from a Git repository option
Select your Git provider, GitHub in our case. Then selecto the starter's repository.
You will have to authorize Gatsby Cloud to access your respository. (You can always modify the configuration in your GitHub Settings Installations)
Skip the integration step
Gatsby Cloud list the environmental variables that were automatically detected. Make sure to fill in the the value for the required
GATSBY_WP_URL
. You also have to provide your secret auth tokenGWPT_AUTH_TOKEN
here.
Deploying on Netlify
- Sign-up to Netlify with your GitHub account.
- Click the New Site from Git button
- Choose your Git provider, GitHub in our case.
- Choose your GitHub repo (you will need authorize Netlify to access it).
- In the configuration screen, choose:
- your branch to deploy - each time you push to this branch, your site will be rebuilt
- the build command:
yarn build
(orgatsby build
) - your publish directory:
public
- open the Advanced build settings panel to add your environment variables. Paste all the variables you set in your
.env
file as well as the secret auth tokenGWPT_AUTH_TOKEN
.
Your build requires two environment variablesGWPT_AUTH_TOKEN
andGATSBY_WP_URL
.
- Click the Deploy site button, the process can take a few minutes.
- Finally in Site settings > Domain management you can change the subdomain (by default it's some random string like modes-gates-51b250). You can also add your own custom.