You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 27, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+24-10Lines changed: 24 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -126,7 +126,9 @@ yarn
126
126
127
127
**Step 4: Setup ENV Variables**
128
128
129
-
ENV variables are like constants in `wp-config.php`. Copy the sample ENV file, then add your credentials:
129
+
ENV variables are like constants in `wp-config.php`. They're required in order for authentication and 3rd party services to work.
130
+
131
+
Copy the [sample ENV file](https://github.com/WebDevStudios/nextjs-wordpress-starter/blob/staging/.env.sample), then modify it to match your credentials:
130
132
131
133
```bash
132
134
cp .env.sample .env
@@ -138,28 +140,40 @@ cp .env.sample .env
138
140
139
141
<details>
140
142
141
-
The following steps require A) access to a Vercel account and B) assumes the ENV vars are already set up on Vercel. If you need access to the WDS Team account on Vercel, please reach out to Greg.
143
+
The preferred workflow is to add ENV variables to Vercel first, then pull them down.
144
+
145
+
**Step 1: Add ENV vars to Vercel**
146
+
147
+
Go to:
148
+
149
+
```text
150
+
Your Project --> Settings --> Environment Variables
**Note:** Make sure your local URL matches the `LOCAL_WORDPRESS_API_URL` in the frontend `.env` file!
199
-
200
212
### Enable Previews
201
213
202
-
To enable previews, you'll need both a `PREVIEW_SECRET_TOKEN` constant in `wp-config.php` and `WORDPRESS_PREVIEW_SECRET` ENV variable in `.env`. The token can be any random string so long as they match.
214
+
To enable previews, you'll need both a `PREVIEW_SECRET_TOKEN` constant in `wp-config.php` and `WORDPRESS_PREVIEW_SECRET` ENV variable in `.env`.
215
+
216
+
The token can be any random string as long as they match.
0 commit comments