WordPress.org

Ready to get started?Download WordPress

Ideas

Option to Delete Mysql data when deleting a plugin

  1. and0r1995
    Member

    It'd be a great addition to let the site owners, Super Admins only to delete the mysql data that a plugin inserted into the database, when deleting the plugin.

    For example, there's BuddyPress. When you install it, the plugin inserts a lot of new tables and data into your database, and if you decide to delete the plugin because it didn't worked out for you as you've wanted to, that data will still remain there. And deleting it manually is a pain. Especially if you don't really have any coding or Mysql knowledge.

    Posted: 8 months ago #
  2. Ipstenu (Mika Epstein)
    Half-Elf Support Rogue & Mod

    This already exists. If the plugin author uses it is up to them :/

    Posted: 8 months ago #
  3. and0r1995
    Member

    But it should be a core option to ask the user to delete it or not. I haven't seen any plugins using it..

    Posted: 8 months ago #
  4. Jam Viet
    Member

    Plugin developer usually "forget" to register a function that remove database.
    I think WordPress should do it automatically soon ASAP

    Posted: 8 months ago #
  5. Ipstenu (Mika Epstein)
    Half-Elf Support Rogue & Mod

    Many plugins do this (W3TC, Bad Behavior, mine...) however sometimes we don't because we don't want anyone to lose all their settings if they temporarily remove a plugin, so there may be a separate 'delete' button. Look for any plugin with an uninstall.php file, though and they do it.

    We can't ever presume to know what's best for the users, so we won't be deleting it unless the dev puts it in, you can forget that one right there mcjambi.

    Posted: 8 months ago #
  6. WebNashr
    Member

    12345

    I came to propose this and I saw that this is already here.
    Obviously plugin authors want their plugin data to remain, but it's the site admin responsibility to keep the database clean. So WordPress has to give an option to admin to delete the database tables when deleting a plugin. If admin is deleting the plugin temporarily he can keep settings and if he wants to delete a plugin permanently he can push the button an have a clean database.
    The same goes for themes.

    Posted: 4 months ago #
  7. Ipstenu (Mika Epstein)
    Half-Elf Support Rogue & Mod

    Already exists. There's no way to do it automatically, without the plugin dev writing in the code themselves, however. It's an option on many plugins, and you should ask all devs to do it :)

    Posted: 4 months ago #
  8. abda53
    Member

    There is a plugin that lets you have direct access to the wp_options table, where you could delete or modify any settings in it. It can destroy your site if you don't know what you are doing, but it is there and does work.

    I found out about it when I wanted to modify some settings directly and was going to build a plugin to do it.. then saw it already exists and works great.

    Posted: 4 months ago #
  9. Ipstenu (Mika Epstein)
    Half-Elf Support Rogue & Mod

    At that point, you're better off learning to use PHPMyAdmin (and how to duplicate a table so if you blow it all to smithereens, you can get it back).

    Posted: 4 months ago #
  10. abda53
    Member

    Agreed, but you should be creating backups anyways... and if you don't know how to do that, you probably shouldn't worry about housecleaning your options table

    Posted: 4 months ago #

RSS feed for this topic

Reply »

You must log in to post.

  • Rating

    12345
    3 Votes
  • Status

    This idea has been implemented