Answers.Body: <p>PHP</p>
  
  <pre><code>\Craft::$app-&gt;plugins-&gt;isPluginInstalled('plugin-handle')
  </code></pre>
  
  <p>Twig</p>
  
  <pre><code>{% set installed = craft.app.plugins.isPluginInstalled('plugin-handle') %}
  </code></pre>
  
  <p>There is also a <code>isPluginDisabled</code> and a <code>isPluginEnabled</code> function.
  Here is a class reference <a href="https://docs.craftcms.com/api/v3/craft-services-plugins.html#isPluginInstalled()-detail" rel="noreferrer">craft\services\Plugins</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-29T17:48:26.997Z
Answers.Text: I think that has to be a record for the fastest correct answer of all time :) Thank you Robin, that's perfect.
Answers.UserDisplayName: Mark Notton
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-03-26T20:43:43.933Z
Answers.Text: Any tips on how to determine a plugin's handle?
Answers.UserDisplayName: Henry
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-12-24T18:48:57.853Z
Answers.Text: @Henry the plugins table in the database has a `handle` column
Answers.UserDisplayName: Marion Newlevant
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-29T17:37:15.590Z
Answers.LastActivityDate: 2017-12-29T17:37:15.590Z
Answers.UserDisplayName: Robin Schambach
Body: <p>In <a href="https://craftcms.stackexchange.com/questions/10632/how-can-i-check-if-a-plugin-is-installed-and-enabled">a question I asked</a> a few years ago, it was very simple to perform a check on wether a plugin was installed or not. </p>
  
  <p>As of Craft 3, the same methods don't seem to work. The likes of this always returns <code>true</code>: </p>
  
  <pre><code>{{ craft.myPlugin is defined ? 'Installed' : 'Not Installed' }}
  </code></pre>
  
  <p>Is there another way to determine if a specific plugin is installed and enabled?</p>
  
Tags: <plugins><craft3>
Title: How can I check if a plugin is installed and enabled, in Craft 3?
ThreadText: # How can I check if a plugin is installed and enabled, in Craft 3?
  
  (Asked by: username_0 on 2017-12-29)
  
  In [a question I asked](https://craftcms.stackexchange.com/questions/10632/how-can-i-check-if-a-plugin-is-installed-and-enabled) a few years ago, it was very simple to perform a check on wether a plugin was installed or not.
  
  As of Craft 3, the same methods don't seem to work. The likes of this always returns `true`:
  
  ```
  {{ craft.myPlugin is defined ? 'Installed' : 'Not Installed' }}
  
  ```
  
  Is there another way to determine if a specific plugin is installed and enabled?
  
  **Tags:** plugins, craft3
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-12-29. Score: 6 | Accepted answer
  
  PHP
  
  ```
  \Craft::$app->plugins->isPluginInstalled('plugin-handle')
  
  ```
  
  Twig
  
  ```
  {% set installed = craft.app.plugins.isPluginInstalled('plugin-handle') %}
  
  ```
  
  There is also a `isPluginDisabled` and a `isPluginEnabled` function.
  Here is a class reference [craft\services\Plugins](https://docs.craftcms.com/api/v3/craft-services-plugins.html#isPluginInstalled()-detail)
  
  > **Comments:**
  > **username_0**: I think that has to be a record for the fastest correct answer of all time :) Thank you username_1, that's perfect.  
  > **username_2**: Any tips on how to determine a plugin's handle?  
  > **username_3**: @username_2 the plugins table in the database has a `handle` column  
  
  ---
  
  