# Kirby Unset Plugins

**URL:** <https://forum.getkirby.com/t/kirby-unset-plugins/3934>\
**Category:** Plugins\
**Created:** [April 22, 2016, 1:20pm UTC](https://forum.getkirby.com/t/kirby-unset-plugins/3934 "2016-04-22T13:20:18Z")\
**Posts on this page:** 10\
**Page:** 1

<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:** [April 22, 2016, 1:20pm UTC](https://forum.getkirby.com/t/kirby-unset-plugins/3934/1 "2016-04-22T13:20:18Z")

</div>

We had a discussion about a way to [deactivate/unset plugins](https://forum.getkirby.com/t/disable-plugins-by-config/3921) by a config value. It was not a very popular topic, as not that many agreed with me.

But I’m quite stubborn so I made it possible anyway.

# Kirby Unset Plugins

[https://github.com/jenstornell/kirby-unset-plugins](https://github.com/jenstornell/kirby-unset-plugins)

**As string:**

```php
c::set('plugin.unset.plugins', 'splitview');

```

**As array:**

```php
c::set('plugin.unset.plugins', [
  'pre-controller',
  'revisions',
  'splitview'
]);

```

Maybe a strange option key, but at least it will probably not collide with the core or other plugins.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [April 22, 2016, 2:06pm UTC](https://forum.getkirby.com/t/kirby-unset-plugins/3934/2 "2016-04-22T14:06:20Z")

</div>

Well, at least we have lots of examples once we get round to writing an intro to plugin creation 😂 So keep going …

As @jakobploens already pointed out in another thread, disabling a plugin usually involves more than just renaming it. Depending on the type of plugin, you also have to remove code from your templates, controllers etc. to make your site work without the plugin.

---

<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:** [April 22, 2016, 2:20pm UTC](https://forum.getkirby.com/t/kirby-unset-plugins/3934/3 "2016-04-22T14:20:05Z")

</div>

I have ideas for at least two more plugins. 😃

> Depending on the type of plugin, you also have to remove code from your templates, controllers etc. to make your site work without the plugin.

That is why I agree that it should not be built into the panel. I will try to explain a simple as possible how I see it from my point of view.

**Look at this:**

As a developer you need to fix something that does not work, or at least find it.

```php
require 'class/page.php';
require 'class/pages.php';
require 'class/models.php';
require 'class/templates.php';
require 'class/snippets.php';

```

Maybe a wierd example. In this case you need to see what will happend if you don’t run `class/snippets.php`.

**What do you do?**

1. Comment out the line?
2. Rename or move the file?

In this case I think most people would just comment out the line.

That’s how I see it with the unset plugin option. As a debug tool, where you can comment or uncomment plugins.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [April 22, 2016, 2:27pm UTC](https://forum.getkirby.com/t/kirby-unset-plugins/3934/4 "2016-04-22T14:27:29Z")

</div>

Yeah, at least until I have to comment out the unset plugin… 😜

Edit:

My point of view: It’s very likely that most of all these plugins will stop working at one point or the other because their authors have moved on to other playgrounds. So, the more plugins I install, the more likely my site will break with the next update. Or I stop updating for fear of breaking my site. That’s probably the reason why so many Wordpress, Joomla etc. sites with all their installed plugins do not get updated and therefore hacked after a while.

---

<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:** [April 22, 2016, 2:30pm UTC](https://forum.getkirby.com/t/kirby-unset-plugins/3934/5 "2016-04-22T14:30:47Z")

</div>

😉 I actually thought about a protection against that by unset that key from the array, but then I felt it’s more the Kirby way to leave it.

---

<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:** [April 22, 2016, 3:11pm UTC](https://forum.getkirby.com/t/kirby-unset-plugins/3934/6 "2016-04-22T15:11:37Z")

</div>

> It’s very likely that most of all these plugins will stop working at one point or the other because their authors have moved on to other playgrounds.

Oh so negative! Then we could just skip the plugins, skip Kirby, skip life…

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [April 22, 2016, 3:21pm UTC](https://forum.getkirby.com/t/kirby-unset-plugins/3934/7 "2016-04-22T15:21:58Z")

</div>

As I said, keep on going … it’s good practice and it’s good for Kirby if there are many plugins, because ready-made solutions will most likely attract more potential users. I only meant to say that there’s always a certain danger in using too many plugins.

---

<div class="post-metadata">

**Author:** ![1n3JgKl9pQ6cUMrW](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/1n3jgkl9pq6cumrw/32/2368_2.png) [@1n3JgKl9pQ6cUMrW](https://forum.getkirby.com/u/1n3JgKl9pQ6cUMrW)\
**Post date:** [April 22, 2016, 4:23pm UTC](https://forum.getkirby.com/t/kirby-unset-plugins/3934/8 "2016-04-22T16:23:35Z")

</div>

> I only meant to say that there’s always a certain danger in using too many plugins.

Thirst thing for all CMS’es (or sites / apps)… don’t rely on plug-ins 🙂

Maybe only for the real huge things (e-commerce, security, analytics, etc…) - but the less plug-ins, the more native (own) code, the better… 😛

---

<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:** [April 23, 2016, 4:14pm UTC](https://forum.getkirby.com/t/kirby-unset-plugins/3934/9 "2016-04-23T16:14:43Z")

</div>

I personally prefer the small plugins that is made to only solved one task. I don’t like the all-in-one solutions. When chosing an all-in-one solution it often lock you in.

---

<div class="post-metadata">

**Author:** ![anikk302](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/anikk302/32/2052_2.png) [@anikk302](https://forum.getkirby.com/u/anikk302)\
**Post date:** [April 24, 2016, 2:49am UTC](https://forum.getkirby.com/t/kirby-unset-plugins/3934/10 "2016-04-24T02:49:55Z")

</div>

thank you for sharing plugins
