◦ Comprehensive security
◦ 24/7 support
WordPress Guide → Plugins → Check Active
How to check if a WordPress plugin is active
Need to know whether a plugin is currently active on your WordPress site? Whether you’re debugging an issue, writing custom code, or just curious about what’s running, checking plugin status is easier than you might think.
Let’s walk through five easy ways to do it—both from the dashboard and with code—plus one powerful bonus method many tutorials skip.
Get fast, reliable hosting for WordPress
Power your site with the industry’s fastest, most optimized WordPress hosting
Why you might need to check plugin status
There are plenty of good reasons to check whether a specific plugin is active on your site or in your code:
- You’re writing custom functions or templates and want to avoid errors if a plugin isn’t enabled.
- You’re troubleshooting a missing feature and want to confirm the plugin is running.
- You’re building a plugin or theme that integrates with another plugin.
- You want to clean up unused plugins on a staging or live site.
Depending on your technical comfort level, you can use the admin interface, a few lines of PHP, or even WP-CLI to find the answer.
Method 1: Check plugin status in the WordPress dashboard
This is the easiest method and doesn’t require any code.
- Go to Plugins > Installed Plugins in your WordPress admin area.
- Scroll or search for the plugin name using the search bar.
- If the plugin is active, it will be highlighted with a white background and include a Deactivate link.
- Inactive plugins have an Activate link instead.
This method is perfect for visual confirmation or quick checks.
Method 2: Use is_plugin_active() in your code
If you’re writing PHP for a theme or plugin, the is_plugin_active() function is the most reliable method.
Here’s how to use it:
include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
if ( is_plugin_active( 'woocommerce/woocommerce.php' ) ) {
// Run WooCommerce-dependent code here
}Make sure you include the plugin.php file first—this function isn’t available by default on the frontend. Also note that the plugin path must match its folder and main file name exactly.
You can find the correct path by visiting the Plugins screen and hovering over the “Edit” or “Deactivate” link for that plugin.
Method 3: Use function_exists() or class_exists()
If you don’t want to hardcode the plugin filename, you can check for a function or class that the plugin defines.
For example:
if ( function_exists( 'woocommerce_add_to_cart' ) ) {
// WooCommerce is active
}
Or using a class:
if ( class_exists( 'WooCommerce' ) ) {
// WooCommerce is active
}This is a great fallback method when the plugin’s filename might vary or when you only care about whether a key feature is available.
Method 4: Check plugin status from the database
If you’re building something advanced or need to scan active plugins globally (like in a multisite setup), you can fetch the list directly from the options table:
$active_plugins = get_option( 'active_plugins' );
if ( in_array( 'akismet/akismet.php', $active_plugins ) ) {
// Akismet is active
}On multisite installations, you’ll also want to check sitewide_active_plugins using get_site_option():
$network_plugins = get_site_option( ‘active_sitewide_plugins’ );
This method is more complex but very useful when building tools or dashboards.
Method 5: Use WP-CLI to check plugin status
If you have SSH access and WP-CLI installed, you can check plugin status right from the terminal.
To list all plugins and their status:
wp plugin list
To check if a specific plugin is installed and active:
wp plugin is-installed woocommerce && echo “Installed”
wp plugin is-active woocommerce && echo “Active”
This is a must-have method for anyone managing multiple environments or automating deployments.
Bonus: Avoid fatal errors with safe plugin checks
Some plugins only load functions or classes under certain conditions. To avoid fatal errors:
- Always check with function_exists() or class_exists() before calling plugin-specific functions.
- Wrap plugin checks inside a proper action hook like init or plugins_loaded.
For example:
add_action( 'plugins_loaded', function() {
if ( function_exists( 'some_plugin_function' ) ) {
// Safe to run plugin-dependent code
}
});This ensures the plugin has had time to fully load before you attempt to use its features.
Next steps for checking WordPress plugin status
Checking if a WordPress plugin is active can help you write safer code, avoid conflicts, and debug site issues faster. Whether you’re using the dashboard or digging into code, there’s a method for every skill level.
Start with the dashboard if you’re a beginner. Developers should use is_plugin_active() or class_exists() for best results in themes and plugin files.
Ready to upgrade your WordPress experience? Professional hosting improves speeds, security, and reliability for a website and a brand that people find engaging and trustworthy.
Don’t want to deal with server management and maintenance either? Our fully managed hosting for WordPress is the best in the industry. Our team are not only server IT experts, but WordPress hosting experts as well. Your server couldn’t be in better hands.
Click through below to explore all of our hosting for WordPress options, or chat with a WordPress expert right now to get answers and advice.
Additional resources
What is a WordPress plugin? →
A complete beginner’s guide to WordPress plugins and how to manage them
Floating Google reviews plugin for WordPress: Top 3 options and how to choose →
Showcase social proof and build trust by displaying floating Google reviews on your website.
How to check if a plugin is safe →
Simple steps to evaluating a plugin before you install and activate it