---
title: Environments
description: Configure environments in Honeybadger for PHP applications.
url: https://docs.honeybadger.io/lib/php/errors/environments/
---

Honeybadger groups errors by the environment they belong to. You don’t have to set an environment, but it can be useful if you’re running your app in different locations, such as “production” and “staging”.

To set the environment in Honeybadger, add the `environment_name` setting to your [configuration](https://docs.honeybadger.io/lib/php/reference/configuration/):

```php
[
    'environment_name' => 'production',
]
```

Honeybadger reports errors in all environments that also have an API key configured.

---

## Try Honeybadger for FREE

Intelligent logging, error tracking, and Just Enough APM™ in one dev-friendly platform. Find and fix problems before users notice.

[Start free trial](https://app.honeybadger.io/users/sign_up)

[See plans and pricing](https://www.honeybadger.io/plans/)
