Title: Environmental Plugin Manager
Author: Andrés Villarreal
Published: <strong>16 de octubre de 2013</strong>
Last modified: 11 de abril de 2014

---

Buscar plugins

![](https://ps.w.org/environmental-plugin-manager/assets/banner-772x250.jpg?rev=
788526)

Este plugin **no se ha probado con las últimas 3 versiones mayores de WordPress**.
Puede que ya no tenga soporte ni lo mantenga nadie, o puede que tenga problemas 
de compatibilidad cuando se usa con las versiones más recientes de WordPress.

![](https://s.w.org/plugins/geopattern-icon/environmental-plugin-manager_528655.
svg)

# Environmental Plugin Manager

 Por [Andrés Villarreal](https://profiles.wordpress.org/andrezrv/)

[Descargar](https://downloads.wordpress.org/plugin/environmental-plugin-manager.1.1.2.zip)

 * [Detalles](https://ve.wordpress.org/plugins/environmental-plugin-manager/#description)
 * [Valoraciones](https://ve.wordpress.org/plugins/environmental-plugin-manager/#reviews)
 *  [Instalación](https://ve.wordpress.org/plugins/environmental-plugin-manager/#installation)
 * [Desarrollo](https://ve.wordpress.org/plugins/environmental-plugin-manager/#developers)

 [Soporte](https://wordpress.org/support/plugin/environmental-plugin-manager/)

## Descripción

**VERY IMPORTANT:** This plugin is deprecated and will not be mantained anymore.
Please consider using [Stage WP Plugin Manager](https://wordpress.org/plugins/stage-wp-plugin-manager/)
instead.

If you develop locally, at some point you’ll have some plugins active in your local
environment that you don’t need anymore when you deploy your code and database to
staging or production. Sure, you can deactivate them before or after deploying, 
but you’re gonna need them again to be active if you want to perform changes to 
your code, or update your local database from your remote one. The whole process
of activate and deactivate plugins for testing purposes could be really frustrating,
and sometimes a complete waste of time.

Is in that kind of situations when the **Environmental Plugin Manager** can be a
really helpful friend. Sadly, due to the sentitive work that this plugin performs,
it doesn’t work right out of the box, so besides from installing this plugin, you
need to do some additional work.

**Please read the following instructions very carefully.**

#### What do I need to make it work?

**The Environmental Plugin Manager works on some assumptions about your workflow:**

 1. You have a constant named `WP_ENV_PLUGINS` defined in your WordPress configuration
    file (often `wp-config.php`).
 2. The `WP_ENV_PLUGINS` value is one of the following: `development`, `staging`, `
    production`.
 3. The value of `WP_ENV_PLUGINS` is different in each of your stages. Some developers
    prefer to keep different configuration files for each one of their environments,
    or change the values of their constants based on some evaluation. For example, 
    you could have something like this in your `wp-config.php` file:
 4. if ( file_exists( dirname( **FILE** ) . ‘/development-config.php’ ) ) { define(‘
    WP_ENV_PLUGINS’, ‘development’); } elseif ( file_exists( dirname( **FILE** ) . ‘/
    staging-config.php’ ) ) { define(‘WP_ENV_PLUGINS’, ‘staging’); } else { define(‘
    WP_ENV_PLUGINS’, ‘production’); }

If you follow this example, note that `development-config.php` should not be included
in your deployments to staging and production, and both `development-config.php`
and `staging-config.php` should not exist in your production environment.

**These assumptions are not going to change**, so you need to follow this practice
in order to use this plugin correctly.

#### How do I set up my environment?

Once you have installed this plugin (my recommendation is to do it first in development),
you will notice that a new link appears under each active plugin of the list, which
reads «Use for development only» (note that «development» could also be «staging»
or «production», depending on your `WP_ENV_PLUGINS` constant). Keep that in mind
and follow these steps:

 1. Activate all the plugins that you need to use for your environment.
 2. Click the «Use for development only» link for all the plugins you want to mark 
    as development-only.

Once you click a link, that plugin will be added to the list of plugins that need
to be active only in the current environment. You can click the «No more development
only» link if you want to remove the plugin from the list.

#### How do I reset my environment after a deploy?

Once you performed a complete deploy (files and database) to a different environment,
let’s say from development to staging, you will see that those plugins you selected
in development to be active only in that environment are still active. Fear not!
This is an intended behavior, as it would be insecure to change the status of the
plugins without your knowledge, so you need to do it manually by just clicking the«
Reset Plugins Environment (staging)» button that you see in your admin bar. After
that, you should see your development-only plugins as not active.

That’s pretty much it. You can test it yourself before deploying by just changing
the values of `WP_ENV_PLUGINS`.

#### Auto-reset mode

If you prefer your environments to be reset automatically, without clicking any 
button, you can add a second constant to your configuration file, called `WP_ENV_PLUGINS_AUTO_RESET`,
which should be set to `true`. If you use this method, you won’t see the reset button
in the admin bar anymore (instead, it will be replaced by an environment indicator),
but keep in mind that the reset process will run every time a page of your site 
is loaded. It shouldn’t take a lot of resources, though.

If you use the auto-reset process, using this plugin as a [must-use](https://codex.wordpress.org/Must_Use_Plugins)
will be a lot more effective.

#### Will this plugin work on MultiSite installations?

If you’re using MultiSite, please note that you can activate and deactivate this
plugin globally, but you cannot manage plugin environments for the whole network,
just for individual sites. Also, this plugin cannot manage network activated plugins.
This is in the to-do list, though.

#### Contribute

You can make suggestions and submit your own modifications to this plugin on [Github](https://github.com/andrezrv/environmental-plugin-manager).

## Instalación

 1. Unzip `environmental-plugin-manager.zip` and upload the `environmental-plugin-manager`
    folder to your `/wp-content/plugins/` directory.
 2. Activate the plugin through the **«Plugins»** menu in WordPress.
 3. Read carefully the instructions in [description page](https://wordpress.org/extend/plugins/environmental-plugin-manager/).

## Reseñas

No hay reseñas para este plugin.

## Colaboradores y desarrolladores

«Environmental Plugin Manager» es un software de código abierto. Las siguientes 
personas han colaborado con este plugin.

Colaboradores

 *   [ Andrés Villarreal ](https://profiles.wordpress.org/andrezrv/)

[Traduce «Environmental Plugin Manager» a tu idioma.](https://translate.wordpress.org/projects/wp-plugins/environmental-plugin-manager)

### ¿Interesado en el desarrollo?

[Revisa el código](https://plugins.trac.wordpress.org/browser/environmental-plugin-manager/),
echa un vistazo al [repositorio SVN](https://plugins.svn.wordpress.org/environmental-plugin-manager/)
o suscríbete al [registro de desarrollo](https://plugins.trac.wordpress.org/log/environmental-plugin-manager/)
por [RSS](https://plugins.trac.wordpress.org/log/environmental-plugin-manager/?limit=100&mode=stop_on_copy&format=rss).

## Registro de cambios

#### 1.1.2

 * Tested up to WordPress 3.8
 * Improvement: avoid PHP warning by removing uninstalled plugins from list of environment-
   only plugins.

#### 1.1.1

 * Tested up to WordPress 3.7.1.
 * Improvement: simplify generated javascript.

#### 1.1

 * Improvement: auto reset mode.
 * Bugfix: correctly return the list of non-current-environment-only plugins.

#### 1.0

First public release.

## Meta

 *  Version **1.1.2**
 *  Last updated **hace 12 años**
 *  Active installations **Menos de 10**
 *  WordPress version ** 3.0 o superior **
 *  Tested up to **3.7.41**
 *  Language
 * [English (US)](https://wordpress.org/plugins/environmental-plugin-manager/)
 * Tags
 * [development](https://ve.wordpress.org/plugins/tags/development/)[environment](https://ve.wordpress.org/plugins/tags/environment/)
   [local](https://ve.wordpress.org/plugins/tags/local/)[plugins](https://ve.wordpress.org/plugins/tags/plugins/)
   [production](https://ve.wordpress.org/plugins/tags/production/)[staging](https://ve.wordpress.org/plugins/tags/staging/)
   [testing](https://ve.wordpress.org/plugins/tags/testing/)
 *  [Vista avanzada](https://ve.wordpress.org/plugins/environmental-plugin-manager/advanced/)

## Valoraciones

 5 out of 5 stars.

 *  [  1 5-star review     ](https://wordpress.org/support/plugin/environmental-plugin-manager/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/environmental-plugin-manager/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/environmental-plugin-manager/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/environmental-plugin-manager/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/environmental-plugin-manager/reviews/?filter=1)

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

[See all reviews](https://wordpress.org/support/plugin/environmental-plugin-manager/reviews/)

## Colaboradores

 *   [ Andrés Villarreal ](https://profiles.wordpress.org/andrezrv/)

## Soporte

¿Tienes algo que decir? ¿Necesitas ayuda?

 [Ver el foro de soporte](https://wordpress.org/support/plugin/environmental-plugin-manager/)