Make WordPress Core

Opened 4 months ago

Last modified 4 months ago

#60550 new defect (bug)

A plugin is deactivated if it is updated and the plugin folder has been renamed at some point.

Reported by: renehermi's profile ReneHermi Owned by:
Milestone: Awaiting Review Priority: normal
Severity: major Version: 6.4.3
Component: Plugins Keywords: 2nd-opinion dev-feedback
Focuses: administration Cc:


This seems to be a new unexpected behavior:

A plugin whose folder has been renamed will be deactivated as soon as you update it.


  • Rename the folder of an activated plugin to something like plugin-name-xy (People do this all the time for several reasons)
  • The plugin will be disabled (expected due to the modified plugin folder)
  • Activate again the plugin via wp-admin
  • Update the plugin to a new version
  • The plugin folder will be renamed to plugin-name (Unexpected)
  • The plugin will be disabled silently (Unexpected)

Change History (2)

#1 @ReneHermi
4 months ago

The plugin will be disabled silently (Unexpected)

I am aware the plugin is disabled because wordpress renames its folder, so the result is not unexpected from a technical viewpoint but WP should not do that, espcially not silently after an update and I "believe" this was not always they case. Did this change intentionally?

The problem is that a user might not notice that a plugin is disabled, especially when plugins are automatically updated.

#2 @ReneHermi
4 months ago

A collegue just told me this behavior exist from the beginning and I assume it's caused by the zip folder structure where the plugin main folder name is the first folder of a

In that case I suggest adding a red colored plugin meta notice like this then:

"You have renamed the plugin folder plugin-name/plugin-name.php to something else. Please rename it or this plugin will be disabled on next update."

This could be realized by a simple check if the plugin slug exist as folder inside the wp-content/plugins/ folder and would not be an expensive check.

Last edited 4 months ago by ReneHermi (previous) (diff)
Note: See TracTickets for help on using tickets.