Manage environments
Overview
This topic explains how to edit the environment settings in LaunchDarkly.
Edit environment settings
To view or update the settings on the “Edit environment” panel:
- Click the project dropdown. The project menu appears:

- Select Project settings. The list of project settings appears.
- Select Environments. The Environments list appears.
- Click the three-dot overflow menu next to your environment.
- Select Edit environment to open the environment editing page.
- Update settings as necessary using the available tabs: Overview, Approvals, or SDK keys.
- Save or cancel your changes before changing tabs or exiting the page.
The main Overview tab on the environment editing page includes the following settings:
Manage flag change and segment approval settings from the Approvals tab. To learn more, read Configuring approvals for an environment.
Use the SDK keys tab create new SDK or mobile keys. To learn more, read Environment and SDK keys.
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.
Each environment also has a time-to-live (TTL) setting. This sets the number of minutes that the PHP SDK can cache feature flag rules locally. The TTL is only used in the PHP SDK, because PHP’s shared-nothing architecture makes LaunchDarkly’s streaming model impossible. To learn more, read the PHP SDK reference.
For customers using PHP, we recommend setting your TTL to at least five minutes in production environments. This lets the PHP SDK cache feature flag rules for five minutes, so most calls to variation will not make a remote request. The tradeoff is that changes you make to your feature flag rules on your Flags list will not take effect for five minutes.
If your site has relatively low traffic (fewer than one request per minute), you may wish to increase the TTL to five minutes or more to take better advantage of the local cache.
If the TTL is set to zero minutes, the SDK will not use a local cache, and every call to variation will make a remote request to our CDN. You can set your TTL to zero in testing environments so it reflects changes immediately, but we do not recommend a zero minute TTL in production.
In high volume PHP environments, we strongly recommend using our Relay Proxy. 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 to open the environment editing page.
- Click the Overview tab if it is not already selected.
- Enter a value in the TTL input (0-60 minutes) field.
- Click Save environment.