I maintain and develop several plugins in the WP repo and have been wanting to deploy some update that display notices/setups new settings for installations that are upgrading to the new version of the plugin. However, it is not possible to manually update a plugin on one's localhost (there is a feature request for this to be included in WP core). I found this post on reddit with some interesting suggestions, namely
- update the code in the WP repo but keep the same current version number, install a lower version number on a localhost and trigger the update via the dashboard.
- use the Github-Updater plugin to update the plugin from a github repo, however not sure if this works. Going to try and come back to post the results here.
- can trigger updates by using the WP Rollback plugin to rollback your plugin version. This sounds a little convoluted, one would have to code the reverse logic to test it.
- Use the Updater plugin which claims it can update from a zip file. (going to test this)
I guess one of the above should do the trick. However, has anyone else come across this problem? What solution have you used?
[EDIT] Option 4 does not trigger the update hook, it simply deactivates/removes the old plugin and installs the new one.