While we offer a backend starter project for use with our frontend starter kits, you may instead prefer to use an existing WordPress project. Follow the steps below to configure an existing WordPress project to work with one of our frontend starter kits.
Before You begin
These instructions assume that you have already installed WordPress using your preferred method.
Install and Activate Plugins
- Install and activate the WPGraphQL Plugin.
- If you are planning on using the Gatsby WordPress frontend starter kit, install and activate the WPGatsby Plugin. This plugin is not required for the Next.js and WordPress starter kit.
Create Supporting Content
Our starter kits assume that there is at least one published post and page in your WordPress backend. A default WordPress install will have a sample of each, but if your site does not have any page or post content, you should create some before proceeding.
The footer in our starter kit sources menu data from a classic WordPress menu with the name 'Example Menu'. If a menu with this name does not exist, the footer menu will not display. The footer component in the starter kit can be customized to source data from a different menu.
Set the Necessary Frontend Environment Variables
At this point, your WordPress site should be configured to work with one of our frontend starter kits. Within your frontend project you will also need to set the necessary environment variables to source data from your WordPress backend.
- Instructions for the Next.js and WordPress starter kit
- Instructions for the Gatsby WordPress starter kit
Enabling Edge Caching
For sites running on Pantheon, a small amount of configuration can be updated in order to enable edge caching and purging across the entire decoupled stack.
Configuration recommendations can be found within the Caching Considerations document.