Manually removing all Media Deduper-related data from a site

Both the free and Pro versions of Media Deduper use uninstall hooks to clean up after themselves when they're uninstalled from WordPress's Plugins screen, but those hooks don't run when the plugin files are deleted directly (that is, outside of the WordPress admin interface). 

Regardless of how you've uninstalled Media Deduper or Media Deduper Pro, if you're no longer using them, there are a few MySQL queries you can run on your database server to make extra sure that any data previously saved by the plugins is removed from your site. Your webhost will usually provide you with a tool for running database queries, such as the web-based phpMyAdmin or the command-line-based mysql. Check your host's documentation for the best or simplest way to run queries against your WordPress database.

Make sure you know your WordPress database prefix. The names of all the tables in your WordPress database will begin with the same few characters – 'wp_' is the default, but some hosts, security plugins, or developers prefer to use non-standard database prefixes, like 'foo_' or 'wp_mywebsitedotcom_'. If you're not sure what your database prefix is, check the names of your database tables, or check your site's wp-config.php file for a line like $table_prefix = 'wp_abc_';

The queries below assume your database prefix is 'wp_'. Substitute yours as needed.

DROP INDEX mdd_hash_index ON wp_postmeta;


DELETE FROM wp_postmeta WHERE meta_key LIKE 'mdd\_%' OR meta_key LIKE '\_mdd\_%';


DELETE FROM wp_options WHERE option_name LIKE 'mdd\_%' OR option_name LIKE 'mdd-%' OR option_name LIKE '\_transient\_mdd\_%' OR option_name LIKE '\_transient\_timeout\_mdd\_%';

If MySQL responds with "Can't DROP 'mdd_hash_index'" or "0 rows affected", don't be alarmed – that simply means MDD has already successfully erased its data and there's nothing left to remove.


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.