Skip to content

Instantly share code, notes, and snippets.

@gjhead
Created October 25, 2022 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gjhead/0f64843ef3da1104e17beb75be8bf86b to your computer and use it in GitHub Desktop.
Save gjhead/0f64843ef3da1104e17beb75be8bf86b to your computer and use it in GitHub Desktop.
You can use environment variables for site statuses though. First add a variable to your .env file or wherever else
environment variables are set – for example something like SITE_FOOBAR_STATUS=0 (it can be named anything). Then open the
site's settings page in the CP, and enter/select that variable with a $ prefix in the site's "Status" field.
That way, the environment variable reference will be saved to project config, and not the actual value, which means you can
set that variable to either 1 or 0 to enable or disable the site across different environments.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment