dotenv
A WordPress plugin to set WordPress options from a .env file.
Consider an alternative
dotenv shows warning signs in 2026 — compare the alternatives below before installing. It runs on 20+ sites and was last updated 5 years ago, and scores 24/100 on our health check.
- Small user base (20+ active installs)
- Very few reviews so far
- No update in 5 years
- Only tested up to WordPress 5.7 (latest is 7.1)
How does it stack up?
Side-by-side on installs, updates, ratings & supportDaily downloads
Download spikes usually follow a new release — each site that auto-updates counts as a download.
Rankings
Where dotenv stands todayWordPress.org search rankings
Live position in the plugin search, top 100| Keyword | Position |
|---|---|
| config | >100 |
| configuration | >100 |
| developer | >100 |
| environment | >100 |
| tools | >100 |
Version adoption
Share of active sites per release.
About dotenv
From the official readme · v1.0.3Description
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.
-
Any option in the
wp_optionstable or retrieved byget_option()can be set this way. -
You can define keys either as
WPENV_BLOGDESCRIPTIONor asWPENV_blogdescription, both will work. -
If you’d like to define the location of your
.envfile, rather than the plugin looking for it, you can filterdotenv_locationto be a directory path. -
You can also change the
WPENV_prefix by filteringdotev_key_prefixto be a different prefix.
Installation
- Install the plugin.
- Add a
.envfile either in the root of your site or one level above. - Add any WordPress options keys to filter with the prefix
WPENV_
- Add a
For developers
Is this your plugin? Show off the numbers.
Add a live badge to your site, docs or GitHub README. It updates on its own — no account needed.
Best dotenv alternatives
All config plugins →FAQ
dotenv: quick answers
Straight answers, pulled from live WordPress.org data.
Live data from WordPress.org · checked Sep 30, 2026
Is dotenv free?
Yes. dotenv is free to download and use from the official WordPress.org plugin directory.
Is dotenv safe to use in 2026?
dotenv shows warning signs in 2026 — compare the alternatives below before installing. It runs on 20+ sites and was last updated 5 years ago, and scores 24/100 on our health check.
How many websites use dotenv?
dotenv is active on 20+ WordPress websites and has been downloaded 4,016 times since it launched in May 2021. It was downloaded 82 times in the last 30 days.
Does dotenv work with WordPress 7.1?
dotenv is officially tested up to WordPress 5.7.19, while the latest release is 7.1.2. It may still work, but try it on a staging site first.
What PHP version does dotenv need?
dotenv requires PHP 5.6 or higher. Most hosts run PHP 8.x today, so it works on any modern WordPress hosting.
When was dotenv last updated?
The latest version, 1.0.3, was released on May 28, 2021 (5 years ago).
Who makes dotenv?
dotenv is developed and maintained by Brad Parbs.
What are the best alternatives to dotenv?
The most popular alternatives to dotenv are Brozzme DB Prefix & Tools A… (10K+ installs), Developer Debug Tools (100+ installs) and Config Constants (100+ installs).
Powered by PageForge
Want thousands of pages that rank like these? Build them in an afternoon.
This directory runs on the same engine as PageForge. Turn any spreadsheet, CSV or API into thousands of fast, SEO-ready WordPress pages — with schema, internal links and AI-written copy baked in.
- CSV, Google Sheets & API data sources
- AI content, schema & internal links per page
- Works with Elementor, Gutenberg, Yoast & Rank Math
- Free on WordPress.org — no credit card