Is there any way to identify unused plugin folders in WordPress?

[ad_1]

I know that the contents of \`/wp-content/plugins\` should be automatically managed as you add/remove plugins automatically.

But let’s say that that process went wrong and you might be holding some folders in there from plugins that somehow aren’t indexing on the backend.

Is there any way to force a reindex of the folder and/or identify folders that shouldn’t still be in there?

[ad_2]
3 Comments
  1. The folder names are usually very descriptive (the name of the plugin with hypens), so if you take a look in the folder you can easily match the folders with the plugins.

    Does that help?

  2. FYI the list of plugins isn’t held in some index, the Plugins admin page scans the wp-content/plugins directory to create the list of plugins.

  3. tl;dr this is an edge case but it’s not magic to sort out if you happen to have this issue

    If you have SFTP access or a file manager plugin, the fastest way is to just count the folders inside the plugins folder, and add active and inactive plugins from plugins.php then compare the two. Plugins listed in the install have a core plugin file – if the file exists, it will be listed as either active or inactive. The only time you have folders inside the plugin directory but not displaying in the install is when the plugin’s primary file is missing or blank. If the numbers don’t match, run through the list alphabetically side by side. A quick visual scan will tell you which has a folder, but isn’t showing as a plugin in the admin dash.

    Alternatively, a simple shortcode functionality can be used when logged in to iterate through the plugins folder and list plugins, while also checking to see if the plugin is active and display any discrepancies. This is a programmatic method and best done by a developer. But truly, it’s unnecessary. Use the manual method, it’ll take 2 minutes.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer