WordPress.org

Ready to get started?Download WordPress

Ideas

Give us the option to not just deactivate, but uninstall a plugin

  1. locolobo
    Member

    12345

    I picture having an "uninstall" link beside the activate / deactivate links in the plugins panel. When clicked, a call is made first to a special uninstall action which may or may not exist, depending on the plugin. Then the plugin itself is deactivated, and then the actual plugin files are deleted.

    A developer who writes a plugin that either creates a database table or adds files outside the plugin space could write an uninstall method. Such a method could be added to a special action hook that only runs when that particular plugin gets uninstalled from the admin panel.

    This way, the user can uninstall a plugin without going through their ftp server or following an author's special instructions.

    It makes things easier on developers as well, since they can spend less time worrying about what will happen if a user decides to stop using their plugin. Simply writing an uninstall method with no GUI or step-by-step documentation to worry about is really pretty easy.

    Posted: 6 years ago #
  2. adamh
    Member

    I think that's what the deactivate_{plugin-filename} hook is for. Developers can write their uninstall routine and attach it so that when the plugin is deactivated, it cleans up.

    Posted: 6 years ago #
  3. locolobo
    Member

    12345

    Just deactivating a plugin should not trigger a database purge or deletion of unnecessary files.

    Let me explain my situation.

    I've created a plugin that people can use to host photos on their blog. A new database table is created by the plugin, and it keeps information about those albums. Each time they add a new album, it creates the files needed to display their images in a slideshow.

    If someone wants to deactivate my plugin, I have to assume that they might reactivate it later. I don't want to clear out files and database information that could be needed again if they choose to reactivate. If I had an uninstall hook, I could be confident that the user doesn't need those files or database entries anymore, and I can easily remove them on their behalf.

    Next, the system itself could remove the files from the actual plugin, rather than forcing the user to go in and clear them out.

    I just think this would be helpful to developers and users alike.

    Posted: 6 years ago #
  4. alalex
    Member

    12345

    I completely agree on this idea. Plugins should offer the option both of deactivating or unistalling, so that you can chose whether to just deactivate it (without information loss) or uninstalling (Completely removing everything).

    Posted: 6 years ago #
  5. Jacob Santos
    Member

    This is complete and will be in WordPress 2.7. There will be a hook that will run when plugins are deleted from the WordPress Plugin Administration panel.

    Posted: 5 years ago #
  6. Chip Bennett
    Theme Review Admin

    This is already implemented.

    Posted: 4 years ago #
  7. Jen Mylo
    Key Master

    Delete link, not uninstall, but it gets the job done.

    Posted: 4 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.

  • Rating

    12345
    9 Votes
  • Status

    This idea has been implemented