Title: is_plugin_inactive
Published: April 25, 2014
Last modified: February 24, 2026

---

# is_plugin_inactive( string $plugin ): bool

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/is_plugin_inactive/?output_format=md#description)
    - [See also](https://developer.wordpress.org/reference/functions/is_plugin_inactive/?output_format=md#see-also)
 * [Parameters](https://developer.wordpress.org/reference/functions/is_plugin_inactive/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/is_plugin_inactive/?output_format=md#return)
 * [More Information](https://developer.wordpress.org/reference/functions/is_plugin_inactive/?output_format=md#more-information)
 * [Source](https://developer.wordpress.org/reference/functions/is_plugin_inactive/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/is_plugin_inactive/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/is_plugin_inactive/?output_format=md#changelog)
 * [User Contributed Notes](https://developer.wordpress.org/reference/functions/is_plugin_inactive/?output_format=md#user-contributed-notes)

[ Back to top](https://developer.wordpress.org/reference/functions/is_plugin_inactive/?output_format=md#wp--skip-link--target)

Determines whether the plugin is inactive.

## 󠀁[Description](https://developer.wordpress.org/reference/functions/is_plugin_inactive/?output_format=md#description)󠁿

Reverse of [is_plugin_active()](https://developer.wordpress.org/reference/functions/is_plugin_active/).
Used as a callback.

For more information on this and similar theme functions, check out the [ Conditional Tags](https://developer.wordpress.org/themes/basics/conditional-tags/)
article in the Theme Developer Handbook.

### 󠀁[See also](https://developer.wordpress.org/reference/functions/is_plugin_inactive/?output_format=md#see-also)󠁿

 * [is_plugin_active()](https://developer.wordpress.org/reference/functions/is_plugin_active/)

## 󠀁[Parameters](https://developer.wordpress.org/reference/functions/is_plugin_inactive/?output_format=md#parameters)󠁿

 `$plugin`stringrequired

Path to the plugin file relative to the plugins directory.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/is_plugin_inactive/?output_format=md#return)󠁿

 bool True if inactive. False if active.

## 󠀁[More Information](https://developer.wordpress.org/reference/functions/is_plugin_inactive/?output_format=md#more-information)󠁿

##### 󠀁[Usage:](https://developer.wordpress.org/reference/functions/is_plugin_inactive/?output_format=md#usage)󠁿

In the Admin Area:

    ```php
    <?php $active = is_plugin_inactive( $plugin ); ?>
    ```

In the front end, in a theme, etc…

    ```php
    <?php
    include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
    $active = is_plugin_inactive( $plugin );
    ?>
    ```

## 󠀁[Source](https://developer.wordpress.org/reference/functions/is_plugin_inactive/?output_format=md#source)󠁿

    ```php
    function is_plugin_inactive( $plugin ) {
    	return ! is_plugin_active( $plugin );
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-admin/includes/plugin.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-admin/includes/plugin.php#L559)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-admin/includes/plugin.php#L559-L561)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/is_plugin_inactive/?output_format=md#related)󠁿

| Uses | Description | 
| [is_plugin_active()](https://developer.wordpress.org/reference/functions/is_plugin_active/)`wp-admin/includes/plugin.php` |

Determines whether a plugin is active.

  |

| Used by | Description | 
| [WP_Plugin_Dependencies::check_plugin_dependencies_during_ajax()](https://developer.wordpress.org/reference/classes/wp_plugin_dependencies/check_plugin_dependencies_during_ajax/)`wp-includes/class-wp-plugin-dependencies.php` |

Checks plugin dependencies after a plugin is installed via AJAX.

  | 
| [WP_Plugin_Dependencies::has_unmet_dependencies()](https://developer.wordpress.org/reference/classes/wp_plugin_dependencies/has_unmet_dependencies/)`wp-includes/class-wp-plugin-dependencies.php` |

Determines whether the plugin has unmet dependencies.

  | 
| [validate_plugin_requirements()](https://developer.wordpress.org/reference/functions/validate_plugin_requirements/)`wp-admin/includes/plugin.php` |

Validates the plugin requirements for WordPress version and PHP version.

  | 
| [do_block_editor_incompatible_meta_box()](https://developer.wordpress.org/reference/functions/do_block_editor_incompatible_meta_box/)`wp-admin/includes/template.php` |

Renders a “fake” meta box with an information message, shown on the block editor, when an incompatible meta box is found.

  | 
| [wp_ajax_install_plugin()](https://developer.wordpress.org/reference/functions/wp_ajax_install_plugin/)`wp-admin/includes/ajax-actions.php` |

Handles installing a plugin via AJAX.

  | 
| [WP_Automatic_Updater::update()](https://developer.wordpress.org/reference/classes/wp_automatic_updater/update/)`wp-admin/includes/class-wp-automatic-updater.php` |

Updates an item, if appropriate.

  | 
| [wp_link_manager_disabled_message()](https://developer.wordpress.org/reference/functions/wp_link_manager_disabled_message/)`wp-admin/includes/bookmark.php` |

Outputs the ‘disabled’ message for the WordPress Link Manager.

  |

[Show 2 more](https://developer.wordpress.org/reference/functions/is_plugin_inactive/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/is_plugin_inactive/?output_format=md#)

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/is_plugin_inactive/?output_format=md#changelog)󠁿

| Version | Description | 
| [3.1.0](https://developer.wordpress.org/reference/since/3.1.0/) | Introduced. |

## 󠀁[User Contributed Notes](https://developer.wordpress.org/reference/functions/is_plugin_inactive/?output_format=md#user-contributed-notes)󠁿

 1.   [Skip to note 3 content](https://developer.wordpress.org/reference/functions/is_plugin_inactive/?output_format=md#comment-content-1452)
 2.    [Codex](https://profiles.wordpress.org/codex/)  [  10 years ago  ](https://developer.wordpress.org/reference/functions/is_plugin_inactive/#comment-1452)
 3.  [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fis_plugin_inactive%2F%23comment-1452)
     Vote results for this note: 0[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fis_plugin_inactive%2F%23comment-1452)
 4.  **Example**
 5.      ```php
         // Makes sure the function is defined before trying to use it
         if ( ! function_exists( 'is_plugin_inactive' ) ) {
             require_once( ABSPATH . '/wp-admin/includes/plugin.php' );
         }
     
         if ( is_plugin_inactive( 'plugin-directory/plugin-file.php' ) ) {
             //plugin is not activated
         }
         ```
     
 6.   [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fis_plugin_inactive%2F%3Freplytocom%3D1452%23feedback-editor-1452)
 7.   [Skip to note 4 content](https://developer.wordpress.org/reference/functions/is_plugin_inactive/?output_format=md#comment-content-6837)
 8.    [Gerard Reches](https://profiles.wordpress.org/gerardreches/)  [  2 years ago  ](https://developer.wordpress.org/reference/functions/is_plugin_inactive/#comment-6837)
 9.  [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fis_plugin_inactive%2F%23comment-6837)
     Vote results for this note: 0[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fis_plugin_inactive%2F%23comment-6837)
 10. Notice that this function is not available at all times. Using it in your plugin’s
     main file will result in a fatal error.
 11.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fis_plugin_inactive%2F%3Freplytocom%3D6837%23feedback-editor-6837)

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fis_plugin_inactive%2F)
before being able to contribute a note or feedback.