<p>I just was pointed to the correct solution (shame on me I did not find it myself):</p>

<p>There already is a config for this:
<a href="https://docs.craftcms.com/v3/config/config-settings.html#disabledplugins" rel="nofollow noreferrer">https://docs.craftcms.com/v3/config/config-settings.html#disabledplugins</a></p>

<p>To be used like this:</p>

<pre><code>'production' =&gt; [
     'disabledPlugins' =&gt; ['cloner', 'cp-field-inspect', 'dumper', 'migration-manager']
],
</code></pre>

<p>Thanks gtettelaar for dropping me a hint! (<a href="https://github.com/craftcms/cms/issues/5107" rel="nofollow noreferrer">https://github.com/craftcms/cms/issues/5107</a>)</p>

CC BY-SA 4.0
2019-10-16T07:18:50.633Z
2019-10-16T07:18:50.633Z
Matthias Redl-Mann
<p>No.</p>

<p>However if you explain more, and the reasons why you want to do this, there might be a solution. </p>

<p>EDIT: Based on comment</p>

<p>As part of my deployment, I would have a diiferent composer.json file for the production environment which would only contain the plugins you want.</p>

<p>Then run <code>composer update</code> on production. Only what you want will be included. </p>

CC BY-SA 4.0
2019-09-27T09:27:08.430Z
OK: There are certain plugins, which are useful for development, e.g. 
"CP Field Inspect" (which shows field handles when editing entries), but not for production. I do not want to load those plugins, when in devMode, or alternatively when ENV = production or something like that.
Matthias Redl-Mann
CC BY-SA 4.0
2019-09-27T12:25:43.987Z
As a response to your changed answer: I also thought about that. But then you always need to re-enable the plugin when you clone the live database to your local one.
Matthias Redl-Mann
CC BY-SA 4.0
2019-09-27T14:41:22.123Z
@MatthiasRedl-Mann my deployments are all scripted, so it is possible to run `./craft install/plugin PLUGINNAME` to automate that also
32423hjh32423
CC BY-SA 4.0
2019-10-07T08:04:16.623Z
same for me, but this does not solve my problem: I either always need to re-enable the plugin locally after having drawn a dump or I need to script this. It's simply the wrong direction.... thanks anyway
Matthias Redl-Mann
CC BY-SA 4.0
2019-09-26T18:50:02.797Z
2019-09-27T09:38:02.013Z
2019-09-27T09:38:02.013Z
32423hjh32423
<p>Is is possible to enable certain plugins only in devMode? (or via some other configuration option)?</p>

CC BY-SA 4.0
2019-10-16T06:44:50.790Z
I made a question / [FR] out of this: https://github.com/craftcms/cms/issues/5107
Matthias Redl-Mann
<plugins><devmode>
Enable plugin in devMode
# Enable plugin in devMode

(Asked by: username_0 on 2019-09-26)

Is is possible to enable certain plugins only in devMode? (or via some other configuration option)?

**Tags:** plugins, devmode

> **Comments:**
> **username_0**: I made a question / [FR] out of this: https://github.com/craftcms/cms/issues/5107  

---

## 2 answers

### Answer by username_0 on 2019-10-16. Score: 2 | Accepted answer

I just was pointed to the correct solution (shame on me I did not find it myself):
There already is a config for this:
https://docs.craftcms.com/v3/config/config-settings.html#disabledplugins
To be used like this:
'production' => [
     'disabledPlugins' => ['cloner', 'cp-field-inspect', 'dumper', 'migration-manager']
],

Thanks gtettelaar for dropping me a hint! (https://github.com/craftcms/cms/issues/5107)


---

### Answer by username_1 on 2019-09-26. Score: 1

No.

However if you explain more, and the reasons why you want to do this, there might be a solution.

EDIT: Based on comment

As part of my deployment, I would have a diiferent composer.json file for the production environment which would only contain the plugins you want.

Then run `composer update` on production. Only what you want will be included.

> **Comments:**
> **username_0**: OK: There are certain plugins, which are useful for development, e.g.  "CP Field Inspect" (which shows field handles when editing entries), but not for production. I do not want to load those plugins, when in devMode, or alternatively when ENV = production or something like that.  
> **username_0**: As a response to your changed answer: I also thought about that. But then you always need to re-enable the plugin when you clone the live database to your local one.  
> **username_1**: @MatthiasRedl-Mann my deployments are all scripted, so it is possible to run `./craft install/plugin PLUGINNAME` to automate that also  
> **username_0**: same for me, but this does not solve my problem: I either always need to re-enable the plugin locally after having drawn a dump or I need to script this. It's simply the wrong direction.... thanks anyway  

---

