• Resolved Stefan Smiljkovic

    (@kinderjaje)


    I just tried this plugin. I have 140k posts, and my DB is already to big.

    I noticed that Deduper are creating new rows in mysql, which mean it would create maybe double of rows i currently have. That is not problem.

    The problem is that on deletion of plugin, your junk rows are left and make db heavy for no reason. If I am not wrong, mdd_hashrow is created by Deduper plugin.

    You should definitely consider making that, since your plugin should be helpful in terms of deleting unused media, and not creating unnecessary junk rows in DB and making website even slower.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter Stefan Smiljkovic

    (@kinderjaje)

    Hey @cornershop, can you confirm on this please?

    Plugin Author cornershop

    (@cornershop)

    Hi @kinderjaje

    I’m sorry that our plugin may have created unnecessary junk. That’s definitely not our intention. I have a ticket into one of our developers to let us know how we can make this right for your site, and I’ll report back as soon as possible.

    Thanks for writing to let us know.

    Best,
    Monica

    Thread Starter Stefan Smiljkovic

    (@kinderjaje)

    Thanks for your response @cornershop.

    All they need to do is to make plugin clean the Mysql rows which created upon creating index. So once the plugin finished the task or even when u delete the plugin, there must be option which will clean all that unnecessary rows from DB. Otherwise the plugin will do more harm then use, cause its gonna almost double the DB.

    Peace,

    Hello, please tell us what data the plugin adds and what we can delete from db when we finish the deletion of duplicated images.

    Plugin Author cornershop

    (@cornershop)

    Hi there! Sorry for the delay.

    You’re right that both the free and Pro versions of Media Deduper add post metadata in order to keep track of which uploads are duplicates of which others. The main purpose of Media Deduper is to save disk space by helping users delete attachments they don’t need, and most of our users have found that the disk space taken up by the additional database rows was negligible when compared with the space they saved by deleting large image or video files.

    Both versions of Media Deduper use an uninstall hook to delete their metadata when the plugin is deleted, but this can only work if a user deletes the plugin by clicking “Uninstall” in wp-admin, or if the plugin is uninstalled using the wp-cli ‘wp plugin uninstall’ or ‘wp plugin deactivate –uninstall’ commands. It sounds like that may not have worked properly on your setup. When you deleted the plugin, did you use either the wp-admin interface or wp-cli, or did you simply delete the plugin files directly?

    If the plugin failed to delete any of its data when it was uninstalled, you can run these two queries to clean up after it (if you’re using a custom database table prefix, use that instead of ‘wp_’):

    DELETE FROM wp_postmeta WHERE meta_key IN ( ‘mdd_hash’, ‘mdd_size’, ‘_mdd_references’, ‘_mdd_referenced_by’ );
    DELETE FROM wp_options WHERE option_name LIKE ‘mdd_pro_index_%’ OR option_name LIKE ‘media_deduper_%’;

    Thread Starter Stefan Smiljkovic

    (@kinderjaje)

    @cornershop Thank you a lot for the efforts and information.

    I gonna keep those in mind when i use your plugin soon.

    Peace,

    What about adding the option to the plugin to manually fire those from a settings/menu page? or additional option on the plugins page?

    This would make it easier to pull off for someone that does not/is not comfortable directly running a query on the DB.

    Plugin Author cornershop

    (@cornershop)

    Hi @mtruitt – Thanks for your message!

    Our developers tell me that deactivating and uninstalling the plugin using the WordPress admin interface – as opposed to uninstalling it by moving or deleting the plugin files using FTP or SSH – will delete any data that the plugin added to the WordPress database.

    We could add a button to the options page to delete all post meta & database options, but there isn’t one yet, and it will all be deleted automatically if users follow the proper, standard WP procedure to deactivate & uninstall the plugin.

    Does that make sense?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Delete rows from mysql when plugin deleted’ is closed to new replies.