DISCLAIMER: this post is older than one year and may not be up to date with latest WordPress version.

When working with lots and lots of plugins, it can be useful for developers to be able to check if a particular WordPress plugin is active or not. Just read this recipe to find out.

If you want to check if a WordPress plugin is active, just use the is_plugin_active() function. The function takes a single parameter, which is the path to the plugin, as shown in the example below:

if (is_plugin_active('plugin-directory/plugin-file.php')) {
    //plugin is activated


One Comment

  1. It’s important to note that this function is found in plugin.php which is not always included. If you want to use this function from within a template or another plugin, you will need to manually require plugin.php.

Leave a Comment

Your email address will not be published. Required fields are marked *