If you’re manually installing a plugin, you need to disable and delete the old version. However, WordPress does allow you to update your plugin programatically.
If your plugin is hosted on the WordPress.org repository, it will prompt the users to install updates for you. You’ve likely seen this with Akismet and other plugins already.
If your plugin isn’t hosted on the WordPress.org repository, there are a few other things you can do. Many premium theme/plugin shops are including their own update scripts in their releases. It allows them to push out updates to their customers that use the standard WordPress update mechanisms to download the new package, install it, and remove old files.
Here are just a few examples:
- WordPress Upgrade Class for Commercial or Client Plugins
- WordPress GitHub Plugin Updater – useful if you host your plugin on GitHub rather than in the WP.org repo
- The “Making Your Own Plugin Repository” section in Chapter 9 of Professional WordPress Plugin Development Note, this is an affiliate link