This site runs best with JavaScript enabled.

WordPress Multisite with Gatsby

Software Engineer, React Training, Testing JavaScript Training

In this post I want to share my experience on how to setup multiple domains with one WordPress instance via Gatsby.js and Netlify. Although the post is describing the process using Netlify, the same high-level approach can be made with other deployment tools/ services.

I've used this starter to take advantage of the boilerplate related to GraphQL. The difference is happening on this line.

Because I need to set that endpoint dynamically, I've configured it to receive an environment variable, like this:

1url: `https://wordpress-multisite.blog/${process.env.SITE}/graphql`,

Than I am just typing the value I do need.

Netlfiy dashboard

That's all. Simple as that.

Vadim Nicolai

Vadim Nicolai is a JavaScript software engineer.