PHPackages                             bradp/dotenv - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. bradp/dotenv

ActiveWordpress-plugin[Utility &amp; Helpers](/categories/utility)

bradp/dotenv
============

Set WordPress options from a .env file

1.0.3(5y ago)13150[3 issues](https://github.com/bradp/dotenv/issues)PHP

Since May 26Pushed 1y ago1 watchersCompare

[ Source](https://github.com/bradp/dotenv)[ Packagist](https://packagist.org/packages/bradp/dotenv)[ RSS](/packages/bradp-dotenv/feed)WikiDiscussions main Synced yesterday

READMEChangelog (2)Dependencies (1)Versions (5)Used By (0)

dotenv
======

[](#dotenv)

> A WordPress plugin to set WordPress options from a .env file.

Any `WPENV_` prefixed variables in the `.env` will be used to override the WordPress options. For example, if you'd like to set a specific environment to "Discourage search engines from indexing this site", you can add `WPENV_BLOG_PUBLIC=0` to your `.env` file.

Usage
-----

[](#usage)

- Install the plugin.
- Add a `.env` file either in the root of your site or one level above.
- Add any WordPress options keys to filter with the prefix `WPENV_`

Details
-------

[](#details)

- Any option in the `wp_options` table or retrieved by `get_option()` can be set this way.
- You can define keys either as `WPENV_BLOGDESCRIPTION` or as `WPENV_blogdescription`, both will work.
- If you'd like to define the location of your `.env` file, rather than the plugin looking for it, you can filter `dotenv_location` to be a directory path.
- You can also change the `WPENV_` prefix by filtering `dotev_key_prefix` to be a different prefix.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance24

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

4

Last Release

1863d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/66798?v=4)[Brad Parbs](/maintainers/bradp)[@bradp](https://github.com/bradp)

---

Top Contributors

[![bradp](https://avatars.githubusercontent.com/u/66798?v=4)](https://github.com/bradp "bradp (24 commits)")[![ImgBotApp](https://avatars.githubusercontent.com/u/31427850?v=4)](https://github.com/ImgBotApp "ImgBotApp (1 commits)")

---

Tags

dev-toolsenvironment-variablesphpwordpresswordpress-plugin

### Embed Badge

![Health badge](/badges/bradp-dotenv/health.svg)

```
[![Health](https://phpackages.com/badges/bradp-dotenv/health.svg)](https://phpackages.com/packages/bradp-dotenv)
```

###  Alternatives

[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[lullabot/drainpipe

An automated build tool to allow projects to have a set standardized operations scripts.

43785.5k4](/packages/lullabot-drainpipe)[ec-europa/toolkit

Toolkit packaged for Drupal projects based on Robo.

40252.8k34](/packages/ec-europa-toolkit)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
