Edit environment settings
This topic explains how to edit environment settings in LaunchDarkly.
This topic explains how to edit environment settings in LaunchDarkly.
Each environment has its own settings that control how LaunchDarkly behaves for that stage of your development lifecycle. You can configure safeguards to protect critical environments, manage SDK credentials, and set flag change approval requirements.
Edit environment settings
To view or update environment settings:
- Click the project dropdown. The project menu appears:

- Select Project settings.
- Select Environments. The Environments list appears.
- Click the three-dot overflow menu next to your environment.
- Select Edit environment.
- Update settings using the Overview, Approvals, or SDK keys tabs.
- Save or cancel your changes before changing tabs or leaving the page.
The Overview tab includes general environment settings and safeguards. For details on individual settings, read Critical environments, Tags, and Secure mode. The following table describes each setting:
The Approvals tab controls flag change and segment approval requirements for the environment. To learn more, read Configuring approvals for an environment.
Use the SDK keys tab to create and manage SDK keys and mobile keys for the environment. To learn more, read SDK credentials.
TTL settings
TTL settings are only used in the PHP SDK
This setting controls how long the PHP SDK can cache feature flag rules locally. You only need to configure this if you are using the PHP SDK.
The time-to-live (TTL) setting controls how long the PHP SDK caches feature flag rules locally. Because PHP’s shared-nothing architecture does not support LaunchDarkly’s streaming model, the PHP SDK relies on this local cache instead. To learn more about the PHP SDK, read the PHP SDK reference.
For production environments, we recommend setting the TTL to at least five minutes. This reduces the number of remote requests the SDK makes, since most calls to variation resolve from the local cache. The tradeoff is that flag rule changes take up to five minutes to propagate. For lower-traffic sites with fewer than one request per minute, a higher TTL makes better use of the local cache.
Setting the TTL to zero disables the local cache entirely, and every call to variation makes a remote request to the LaunchDarkly CDN. A zero-minute TTL can be useful in testing environments where you need changes to reflect immediately, but we do not recommend it in production. For high-volume PHP environments, we strongly recommend using the Relay Proxy instead. To learn more, read The Relay Proxy.
To set the TTL:
- Click the project dropdown. The project menu appears.
- Select Project settings.
- Select Environments. The Environments list appears.
- Click the three-dot overflow menu next to your environment.
- Select Edit environment.
- Click the Overview tab if it is not already selected.
- Enter a value in the TTL input (0-60 minutes) field.
- Click Save environment.