Configuring a Preview Site
Before You Begin
Make sure you have necessary permissions, for example login as Site Administrator user.
- Log in to your WordPress instance.
- Make sure Pantheon Decoupled & Decoupled Preview plugins are activated.
Creating a new Preview Site Configuration
- Go to the Settings >> Pantheon Front-End Sites section of your WordPress instance.
- Click on Add preview site to create a new configuration for your preview site.
- Fill out the form to set up the Label, URL, Secret, Preview Type, Associated User, and select the Content Type required.
- Set the URL to point to http(s)://{YOUR_SITE_URL}/api/preview replacing
{YOUR_SITE_URL}
with the URL of your frontend site, orlocalhost:3000
for testing preview locally. - Set a secret for the Preview Site and note this value down.
Editing an existing Preview Site Configuration
- Go to the Settings >> Pantheon Front-End Sites section of your WordPress instance.
- Locate the existing preview site you wish to edit, such as the Example NextJS Preview site.
- Click on Edit to open the configuration form.
- Update the placeholder URL to the desired URL for your preview site, from the
example URL
https://example.site/api/preview
replaceexample.site
with the URL of your frontend site or uselocalhost:3000
for local testing. - Save your changes.
note
If you are not using the pantheon-decoupled plugin, the Preview Sites settings page will provide comparable configuration.