I have inherited a plugin. If the plugin is called example
and is in /wp-content/plugins/example
what are the implications if the main plugin file is called example-plugin.php
and not just example.php
?
I know that the plugin will work, but are there any unforeseen problems that could arise?
I do understand that changing it will cause the plugin to deactivate, but there is a very clear notice.
FWIW this has come about because I am trying to use the internal updater on a custom Pro version of a plugin (that isn't in the repository) using this: getbutterfly.com/custom-wordpress-plugin-update-server and it only works if the plugin file name matches the plugin slug
Plugin Name
header, e.g.my-plugin
if the header's value isMy Plugin
). But we should follow the plugin handbook's recommendation - "it’s also good to name this file after your plugin".$plugin_slug . '/' . $plugin_slug . '.php'
to$plugin_slug . '/example-plugin.php'
) I already tried & tested that with WordPress v6.3.1, and my (test) plugin was updated just fine with the help of that custom updater plugin/code.