Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify behavior of Disallow Indexing plugin #153

Merged
merged 2 commits into from
Aug 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion bedrock/deploying-bedrock.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ Any other deployment method can be used as well with one requirement:

Although we recommend using [Trellis](https://roots.io/trellis/), it's not required in order to deploy a Bedrock site.

If you choose to use Capistrano for deployment, we offer a [screencast on deploying WordPress with Capistrano](https://roots.io/screencasts/deploying-wordpress-with-capistrano/) with more information.
If you choose to use Capistrano for deployment, we offer a [screencast on deploying WordPress with Capistrano](https://roots.io/screencasts/deploying-wordpress-with-capistrano/) with more information.

Whatever method you use to deploy, make sure that it involves setting `WP_ENV` to `production` when your site is in a production environment. Several things in the Roots stack, including the [Disallow Indexing mu-plugin](https://github.com/roots/bedrock/blob/master/web/app/mu-plugins/disallow-indexing.php) and [Soil](https://roots.io/plugins/soil/) rely on `WP_ENV` being set to the correct environment. The Disallow Indexing plugin, for instance, will prevent indexing of a site when `WP_ENV` is not set to `production`. For more details on `WP_ENV`, refer back to the "[Environment Variables](/bedrock/docs/environment-variables/)" section of this document.
10 changes: 10 additions & 0 deletions bedrock/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,13 @@ Currently, the following env vars are required:
* `DB_PASSWORD`
* `WP_HOME`
* `WP_SITEURL`

## WP_ENV

Although it isn't required (if not defined elsewhere, Bedrock will default to `production`), `WP_ENV` is used by several pieces of the Roots stack, as well as software outside of it, to modify behavior based on environment. There are three values you can set for `WP_ENV` that Bedrock will understand:

* `production`
* `staging`
* `development`

Make sure that these are set correctly in your different environments.