# Disable plugins by config

**URL:** <https://forum.getkirby.com/t/disable-plugins-by-config/3921>\
**Category:** Questions\
**Tags:** v2\
**Created:** [April 21, 2016, 7:09am UTC](https://forum.getkirby.com/t/disable-plugins-by-config/3921 "2016-04-21T07:09:49Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![jenstornell](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/jenstornell/32/546_2.png) [@jenstornell](https://forum.getkirby.com/u/jenstornell)\
**Post date:** [June 27, 2017, 1:11pm UTC](https://forum.getkirby.com/t/disable-plugins-by-config/3921/15 "2017-06-27T13:11:07Z")

</div>

I want to wake this up old topic again. I still vote for a config to disable plugins of choice.

> [@Disable plugin on localhost](https://forum.getkirby.com/t/disable-plugin-on-localhost/7817/):
>
> Hello, is it possible to disable a plugin on a localhost dev server? i’ll try this plugin: [GitHub - getkirby-v2/cdn-plugin](https://github.com/getkirby-plugins/cdn-plugin) But it would not work on localhost i think. Svnt

A new take on why it can be beneficial is that different environments may have different needs.

## An example

### `config.localhost.php`

```php
c::set('kirby.disable.plugins', ['kirby-html-minifier', 'kirby-ga']); 

```

### `config.yourdomain.com.php`

```php
c::set('kirby.disable.plugins', ['kirby-panel-brand']); 

```

**Benefits**

- For two of the plugins, I’ve built in an option to disable them already. Unfortunately, far from all plugins a disable feature.
- In the `config.php`, It’s much simpler to have one option to control all the plugins, than having a unique config for every plugin that supports disabling.
- Imagine 300+ plugins with the support for a disable option. Compare the extra code and work to if it was done in the core 1 time.

**Sources:**

- [GitHub - kirby-deprecated-plugins/kirby-ga: Kirby GA - Google Analytics](https://github.com/jenstornell/kirby-ga)
- [GitHub - kirby-deprecated-plugins/kirby-html-minifier: Minify the html output of a site built with Kirby CMS](https://github.com/jenstornell/kirby-html-minifier)
- [GitHub - flokosiol/kirby-panel-brand: Possible to add a color and a text at the top of the Kirby Panel](https://github.com/jenstornell/kirby-panel-brand)

---

_[View the full topic](https://forum.getkirby.com/t/disable-plugins-by-config/3921)._
