| 开发者 | bsolveit |
|---|---|
| 更新时间 | 2026年1月12日 01:41 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 6.9 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
WP_ENVIRONMENT_TYPE)WP_ENV)WP_ENVIRONMENT_TYPEWP_ENVenvironment-indicator folder to /wp-content/plugins/No. The indicator only displays for logged-in users who can see the WordPress admin bar. There is zero impact on public visitors.
Yes! Enable custom colors in Settings → Environment Indicator and choose any color for DEV, STAGING, and LIVE environments.
Absolutely. Enable custom labels and rename them to anything you want: LOCAL, UAT, PRODUCTION, or company-specific terms.
Yes. When network-activated, settings are managed network-wide from Network Admin → Settings → Environment Indicator.
Environment Indicator automatically detects environments on:
Yes. Enable role-based visibility and select which user roles can see the environment indicator. This is useful for client sites where you don't want clients to see the indicator.
No. Environment Indicator is visual only. It does not restrict editing, block actions, or change how WordPress behaves. It simply provides a clear visual reminder of which environment you're working in.
If no environment constants or recognized subdomain patterns are found, the site defaults to LIVE. You can override this using manual mode in the settings.
Yes! Use the Export/Import feature to download your settings as JSON and import them on other sites. Perfect for agencies deploying the same configuration across client sites.
Add one of these lines to your wp-config.php file:
For WordPress 5.5+:
define( 'WP_ENVIRONMENT_TYPE', 'development' ); // or 'staging' or 'production'
For legacy Bedrock:
define( 'WP_ENV', 'development' ); // or 'staging' or 'production'