#Environments Wordpress Plugin
WP-Environments is a wordpress plugin to set which environment your Wordpress install is in such as local, staging, and production based on domains you define for each.
After activation a new sub section in "Settings" called "Environments" will appear.
Once all plugins are loaded, before the theme is loaded, the following constants and functions become available:
WPE_isLocal() WPE_isStaging() WPE_isPreProd() WPE_isProd()
WPE_ENV_DEV WPE_ENV_STAGING WPE_ENV_PREPROD WPE_ENV_PROD WPE_ENV
WPE_addLocalDomain( string|array $domain ) WPE_addStagingDomain( string|array $domain ) WPE_addPreProdDomain( string|array $domain ) WPE_addProdDomain( string|array $domain )
- 0.0.5r5
- Arrays can now be used when adding domains.
- Added pre-production environment; running on a client's staging environment for example.
- Cleaned up code for displaying options.
- Added Prebaked Code section if the person would like to use this in wp-config.php.
- New docs.
- 0.0.4r4
- New docs.
Currently there are no big plans for the plugin. It's a simple plugin... So... yea.
This is not code golf.