Plugin gets reinstalled into wrong (indexed) directory
-
Hi there. I have a plugin that I’m developing and my problem is that WordPress is creating a new (indexed) folder for the plugin every time I reinstall it!
For example, on first install everything is fine. The plugin (MyPlugin) gets installed into the wp-content/plugins/MyPlugin directory. So I deactivate and uninstall the plugin. I reinstall the plugin through the WordPress backend. This time the plugin gets put into wp-content/plugins/MyPlugin1 directory. Notice the 1 at the end.
My question is, why does WordPress do this even when the plugin uninstall was successful?
It turns out that every time I install my plugin, WordPress does not overwrite the old one in the uploads folder, and instead creates a new (indexed) name for it:
MyPlugin.zip
MyPlugin1.zip
MyPlugin2.zip
etc…This coincides with the problem mentioned earlier. Any idea how to work around it? It doesn’t seem like WordPress should be renaming plugins like this, unless of course a directory already existed with the same name.
- The topic ‘Plugin gets reinstalled into wrong (indexed) directory’ is closed to new replies.