# Environment File Editor

> Edit your site's environment variables directly from the FlyWP dashboard without SSH access.

Source: https://flywp.com/docs/site/environment-file-editor/

The **Environment File Editor** lets you view and modify your site’s environment configuration file directly from the FlyWP dashboard — no SSH access required.

![Environment file editor](https://flywp.com/images/docs/screenshots/site-environment.png)

## What Are Environment Variables

Environment variables are key-value pairs that control how your application behaves at runtime. They are stored in a file on the server and read by WordPress and any plugins or themes that support them.

Common uses include:

- Setting API keys or secret tokens required by plugins
- Defining service endpoints that differ between staging and production
- Enabling or disabling debug modes without touching code
- Passing credentials to third-party integrations

:::tip
Most WordPress configuration — database connection, table prefix, debug flags, salts — is better managed through the [WP Config Editor](https://flywp.com/docs/site/configurations/wp-config/). Use the Environment File Editor specifically for non-standard environment variables that your plugins or custom code require via `getenv()` or `$_ENV`.
:::

## Opening the Editor

1. Open your site from the FlyWP dashboard.
2. Click the **Environment** tab in the site navigation.

The editor loads the current contents of your site’s environment file from the server and displays them in a syntax-highlighted code editor.

## Editing and Saving

Make your changes directly in the editor. Each variable follows the format:

```text
VARIABLE_NAME=value
```

When you are done, click **Save** to write the changes back to the server. FlyWP sends the updated file to your server and applies it immediately — no restart is needed for the file itself, though some applications may require a PHP or Docker restart to pick up new values.

Editing the environment file incorrectly can break your site. A syntax error, a missing value, or an incorrect credential can cause plugin failures or a white screen. Before making significant changes, note the current values so you can restore them if needed.

## Common Environment Variables

| Variable | Description |
| --- | --- |
| `APP_ENV` | Application environment (`production`, `staging`, `development`) |
| `APP_DEBUG` | Enable verbose error output (`true` or `false`) |
| `STRIPE_KEY` | Public key for Stripe payment integration |
| `STRIPE_SECRET` | Secret key for Stripe payment integration |
| `MAILGUN_SECRET` | API key for Mailgun email delivery |
| `AWS_ACCESS_KEY_ID` | AWS credentials for S3 or other AWS services |

The variables available depend entirely on which plugins and themes your site uses. Refer to your plugin’s documentation for the variable names it expects.

## Related Pages

- [WP Config Editor](https://flywp.com/docs/site/configurations/wp-config/)
- [Site Settings](https://flywp.com/docs/site/settings/)
- [NGINX Configuration](https://flywp.com/docs/site/configurations/nginx-config-editor/)
- [Site Logs](https://flywp.com/docs/site/monitoring-and-logs/logs/)
