If you manage client websites or run a multi-user WordPress setup, sometimes you need to hide specific plugins so no one accidentally disables or edits them. The good news is you can hide any plugin from the WordPress dashboard without breaking your site.
Here’s the easiest and safest method.
To hide a specific plugin from the WordPress Dashboard’s “Installed Plugins” list, you can use a code snippet within a must-use plugin or your theme’s functions.php file.
Why Hide Plugins in WordPress?
You may want to hide a plugin if:
- Clients should not deactivate important plugins
- You want to protect security plugins
- You use custom-built or premium scripts you don’t want visible
- You run a membership site where admins should see fewer options
Hiding plugins doesn’t disable them. They continue working in the background while staying invisible inside Plugins > Installed Plugins.
Method 1: Hide Plugins Using a Simple Code Snippet (Recommended)
You can add a small snippet to the theme’s functions.php or use a “Code Snippets” plugin.
Hide a Specific Plugin
Replace the plugin folder name inside the array.
function encodebyte_hide_plugins( $plugins ) {
if ( is_admin() ) {
$plugins_to_hide = array(
'wordfence/wordfence.php',
'yoast-seo/wp-seo.php'
);
foreach ( $plugins_to_hide as $plugin ) {
if ( isset( $plugins[ $plugin ] ) ) {
unset( $plugins[ $plugin ] );
}
}
}
return $plugins;
}
add_filter( 'all_plugins', 'encodebyte_hide_plugins' );
How to find the plugin path
- Go to
/wp-content/plugins/ - Open the plugin’s folder
- Find the main file name (example:
plugin-folder/plugin.php)
Add that into the array and the plugin will disappear from the dashboard.
Method 2: Completely Hide “Plugins” Menu for Editors (Optional)
If you want to block non-admins from even seeing the Plugins menu:
function encodebyte_remove_plugin_menu() {
if ( ! current_user_can( 'administrator' ) ) {
remove_menu_page('plugins.php');
}
}
add_action( 'admin_menu', 'encodebyte_remove_plugin_menu' );
Admins will still see everything. Editors, authors, and other roles won’t.
Is It Safe?
Yes, hiding plugins is safe as long as:
- You don’t hide plugins you need to update manually
- You keep track of what you hide
- You still check updates regularly
The plugin will keep working normally. It’s only hidden from the list.
SEO Tip
Hiding plugins does not affect SEO or site speed. It only modifies what appears in the dashboard.
Conclusion
If you want cleaner dashboards, added protection, or peace of mind for client websites, this simple code-based method is the easiest and most effective way to hide plugins in WordPress.
