Title: dotenv
Author: Brad Parbs
Published: <strong>2021 年 5 月 26 日</strong>
Last modified: 2021 年 5 月 28 日

---

搜索插件

![](https://ps.w.org/dotenv/assets/banner-772x250.png?rev=2538828)

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://ps.w.org/dotenv/assets/icon-256x256.jpg?rev=2538828)

# dotenv

 作者：[Brad Parbs](https://profiles.wordpress.org/bradparbs/)

[下载](https://downloads.wordpress.org/plugin/dotenv.1.0.3.zip)

 * [详情](https://cn.wordpress.org/plugins/dotenv/#description)
 * [评价](https://cn.wordpress.org/plugins/dotenv/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/dotenv/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/dotenv/#developers)

 [支持](https://wordpress.org/support/plugin/dotenv/)

## 描述

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_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.

## 安装

 * 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_`

## 评价

此插件暂无评价。

## 贡献者及开发者

「dotenv」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Brad Parbs ](https://profiles.wordpress.org/bradparbs/)

「dotenv」插件已被翻译至 1 种本地化语言。 感谢[所有译者](https://translate.wordpress.org/projects/wp-plugins/dotenv/contributors)
为本插件所做的贡献。

[帮助将「dotenv」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/dotenv)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/dotenv/)，查看[SVN仓库](https://plugins.svn.wordpress.org/dotenv/)，
或通过[RSS](https://plugins.trac.wordpress.org/log/dotenv/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/dotenv/)。

## 额外信息

 *  版本 **1.0.3**
 *  最后更新：**5 年前**
 *  活跃安装数量 **20+**
 *  WordPress 版本 ** 5.2 或更高版本 **
 *  已测试的最高版本为 **5.7.15**
 *  PHP 版本 ** 5.6 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/dotenv/) 和 [Swedish](https://sv.wordpress.org/plugins/dotenv/).
 *  [翻译成简体中文](https://translate.wordpress.org/projects/wp-plugins/dotenv)
 * 标签
 * [config](https://cn.wordpress.org/plugins/tags/config/)[configuration](https://cn.wordpress.org/plugins/tags/configuration/)
   [developer](https://cn.wordpress.org/plugins/tags/developer/)[environment](https://cn.wordpress.org/plugins/tags/environment/)
   [tools](https://cn.wordpress.org/plugins/tags/tools/)
 *  [高级视图](https://cn.wordpress.org/plugins/dotenv/advanced/)

## 评级

尚未提交反馈。

[Your review](https://wordpress.org/support/plugin/dotenv/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/dotenv/reviews/)

## 贡献者

 *   [ Brad Parbs ](https://profiles.wordpress.org/bradparbs/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/dotenv/)