Platform.sh User Documentation

Deactivate an environment

Try for 30 days
Flexible, version-controlled infrastructure provisioning and development-to-production workflows
Activate your trial

If you have environments you aren’t using, you may want to deactivate them to save resources for what you need. To deactivate an environment, you need to be an admin for the project or the given environment.

Deactivating the project results in the following:

  • The environment becomes inactive. Unless it’s reactivated, it’s no longer deployed and isn’t accessible from the web or via SSH.
  • All services running on this environment are deleted.
  • All data specific to the environment is deleted. If the environment is reactivated, it syncs data from its parent environment.

Deactivate an environment Anchor to this heading

To deactivate an environment, follow these steps:

  • Select the project with an environment you want to deactivate.
  • From the Environment menu, select the environment.
  • Click Settings.
  • In the row with Status, click Edit .
  • Select the checkbox to show you understand the consequences.
  • Click Deactivate & Delete Data.
  • Confirm your choice.

Run the following command:

platform environment:deactivate ENVIRONMENT_NAME

Delete the branch Anchor to this heading

Inactive environments still have branches in Git. To delete the branch entirely, run the following command:

git push origin --delete BRANCH_NAME

Reactivate an environment Anchor to this heading

Reactivating an environment syncs data from its parent environment.

To reactivate an inactive environment, follow these steps:

  • Select the project with an environment you want to reactivate.
  • From the Environment menu, select the environment.
  • Click Settings.
  • In the row with Status, click Edit .
  • Click Activate.

Run the following command:

platform environment:activate ENVIRONMENT_NAME

If you’re not using a source integration, you can also activate an environment when pushing changes to it. To do so, run the following command:

git push -o "environment.status=active"

Learn more about how to trigger actions on push.

Is this page helpful?