Does WordPress run install/uninstall functions on plugin upgrade?
In the current version of my plugin, I create a page on install, and remove it on uninstall. In a new, planned version, I've refactored such that I no longer need that page anymore. When a user upgrades to the new version, will WordPress run the uninstall function before upgrading and then does it run the install on every upgrade, as opposed to only on new installations?
If I remove the uninstall function in the new version (as it's not needed anymore), will users of the old version get an orphaned page with no code which will ever clean it up? In which case, should I leave the code to remove the page, forever?
I'm looking for insight on the WordPress plugin upgrade lifecycle, thanks.
Topic upgrade plugin-development Wordpress
Category Web