Title: Cleanup Duplicate Meta
Author: Tonya Mork
Published: <strong>May 9, 2015</strong>
Last modified: May 9, 2015

---

Search plugins

![](https://ps.w.org/cleanup-duplicate-meta/assets/banner-772x250.jpg?rev=1156597)

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://s.w.org/plugins/geopattern-icon/cleanup-duplicate-meta_cccccc.svg)

# Cleanup Duplicate Meta

 By [Tonya Mork](https://profiles.wordpress.org/hellofromtonya/)

[Download](https://downloads.wordpress.org/plugin/cleanup-duplicate-meta.1.0.2.zip)

 * [Details](https://en-ca.wordpress.org/plugins/cleanup-duplicate-meta/#description)
 * [Reviews](https://en-ca.wordpress.org/plugins/cleanup-duplicate-meta/#reviews)
 *  [Installation](https://en-ca.wordpress.org/plugins/cleanup-duplicate-meta/#installation)
 * [Development](https://en-ca.wordpress.org/plugins/cleanup-duplicate-meta/#developers)

 [Support](https://wordpress.org/support/plugin/cleanup-duplicate-meta/)

## Description

There are times when your database gets filled up with duplicate entries that you
may not want. Cleanup Duplicate Meta allows you to check for any duplicates in either
the Post Meta or User Meta tables. Then if you want to get rid of them, simply click
on the Cleanup button and Cleanup Duplicate Meta deletes the duplicates leaving 
either the first or last meta (you select which).

The interface is simple and easy to use:

 1. ‘Check for Duplicates’ queries the database and then displays all the duplicates
    found.
 2. ‘Count Duplicates’ counts all the duplicates found in the database (i.e. a total
    count).
 3. The ‘Cleanup’ buttons trigger a SQL query to run, which deletes each of the duplicate
    entries, leaving either the first or last one (per your selection) in the database.
    All non-duplicates remain untouched by the plugin.

See the [screenshots tab](https://wordpress.org/extend/plugins/cleanup-duplicate-meta/screenshots/)
for more details.

## Screenshots

 * [[
 * The plugin’s page in Tools > ‘Cleanup Duplicates’.
 * [[
 * Screen for both the Post Meta and User Meta controls.
 * [[
 * An example of the table generated when clicking on ‘Check for Duplicates’ button.
   The results are sorted by meta key.
 * [[
 * After clicking on the ‘Count Duplicates’ button, notification is displayed of
   the number of duplicates found (which could be deleted).
 * [[
 * The message after clicking on ‘Cleanup Post Meta’.

## Installation

#### From your WordPress dashboard

 1. Visit ‘Plugins > Add New’
 2. Search for ‘Cleanup Duplicate Meta’
 3. Activate Cleanup Duplicate Meta from your Plugins page.

#### Once Activated

 1. Go to ‘Tools > Cleanup Duplicates’
 2. Click on the ‘Check for Duplicates’ button for either Post or User Meta.
 3. If there are duplicates, you can then click on ‘Cleanup Post Meta’ or ‘Cleanup 
    User Meta’ button.

## FAQ

  How do I check how many duplicates are in either the Post Meta or User Meta table?

Simply click on the ‘Check for Duplicates’ button and the plugin will report the
count back to you on the screen.

See the [screenshot 2](https://wordpress.org/extend/plugins/cleanup-duplicate-meta/screenshots/)
for an example.

  How do I know whether to leave the first or last one?

If you know which one you want, then select either the first or last one. Otherwise,
leave it at the default.

  Should I backup my database first?

Yes. Before you run Cleanup, you should backup your database.

  Will this work on WordPress multisite?

Yes!

  What happens to non-duplicates when I run Cleanup?

Nothing. Cleanup Duplicate Meta does not touch non-duplicates. Therefore you’re 
data remains intact.

## Reviews

![](https://secure.gravatar.com/avatar/ddde9fbcbc60a8e5d3fb47a09a73b1486ebc850b7640afe8abfbc2aef0e739b5?
s=60&d=retro&r=g)

### 󠀁[Wow! It saved my site!](https://wordpress.org/support/topic/wow-it-saved-my-site/)󠁿

 [Anonymous User](https://profiles.wordpress.org/anonymized-13160912/) March 5, 
2021

I had over a million duplicate post meta entries from Avada (Theme Fusion). It shrinked
my wp_postmeta table to 1/10 of the original size. Thank you and please update your
plugin.

![](https://secure.gravatar.com/avatar/3c580c36bf2bc1f01b26009195da59353308fae352a956d3bb655e03908fade9?
s=60&d=retro&r=g)

### 󠀁[Works perfect](https://wordpress.org/support/topic/works-perfect-833/)󠁿

 [Rocket Apps](https://profiles.wordpress.org/mikeyott/) September 25, 2020

Cleaned up nearly 70,000 redundant _postmeta records with just a couple of clicks.
Top marks.

![](https://secure.gravatar.com/avatar/324b786e12c80a2623a23098de59c6437fad93bb8985f550bb7124e1786d8ca8?
s=60&d=retro&r=g)

### 󠀁[Still works](https://wordpress.org/support/topic/still-works-185/)󠁿

 [tomfaber](https://profiles.wordpress.org/tomfaber/) September 11, 2020

Nice tool, does what it needs to.

![](https://secure.gravatar.com/avatar/51cbfd3f9f1c839222810f1c06c5bee18cf0e6e7bd3346f05755251eb27ee4d8?
s=60&d=retro&r=g)

### 󠀁[Tonya Mork is a GENIUS. Plugin Still working in 2020](https://wordpress.org/support/topic/tonya-mork-is-a-genius-plugin-still-working-in-2020/)󠁿

 [ctrlaltdelete](https://profiles.wordpress.org/ctrlaltdelete/) March 28, 2020

This plugin helped me remove 31195 Duplicate records in the wp_postmeta database
table. Most were ACF fields, i don’t know why they are there but some posts had 
up to 8 times the same field… It also helped me find old meta by old plugins i don’t
even remember using so i was able to delete all of those (the originals too) with
phpmyadmin. It shaved 10 MB of wp_postmeta!

![](https://secure.gravatar.com/avatar/a94f1b300cef632b78a07ae328691f603bf630a59e62458cc8dfe1a6262c7557?
s=60&d=retro&r=g)

### 󠀁[Old but works!!](https://wordpress.org/support/topic/old-but-works-3/)󠁿

 [goddess_dix](https://profiles.wordpress.org/goddess_dix/) September 25, 2018

Just tried this (09/2018) and it works like a charm. Wow, that was helpful!!! Thank
you.

![](https://secure.gravatar.com/avatar/0afc88ab02b1d95c375263c947383e2d478725d2c1cdd5d37b9b5df1597fa39b?
s=60&d=retro&r=g)

### 󠀁[Really handy plugin](https://wordpress.org/support/topic/really-handy-plugin-10/)󠁿

 [Luke Cavanagh](https://profiles.wordpress.org/lukefiretoss/) July 24, 2018

Did not know this plugin existed, tested and works with the current version of WordPress(
4.9.7).

 [ Read all 11 reviews ](https://wordpress.org/support/plugin/cleanup-duplicate-meta/reviews/)

## Contributors & Developers

“Cleanup Duplicate Meta” is open source software. The following people have contributed
to this plugin.

Contributors

 *   [ Tonya Mork ](https://profiles.wordpress.org/hellofromtonya/)
 *   [ WPDC ](https://profiles.wordpress.org/wpdevelopersclub/)

[Translate “Cleanup Duplicate Meta” into your language.](https://translate.wordpress.org/projects/wp-plugins/cleanup-duplicate-meta)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/cleanup-duplicate-meta/),
check out the [SVN repository](https://plugins.svn.wordpress.org/cleanup-duplicate-meta/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/cleanup-duplicate-meta/)
by [RSS](https://plugins.trac.wordpress.org/log/cleanup-duplicate-meta/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### Version 1.0.2

 * Added in missing files to repo

#### Version 1.0.1

 * First release

## Meta

 *  Version **1.0.2**
 *  Last updated: **11 years ago**
 *  Active installations: **200+**
 *  WordPress Version: ** 3.5 or higher **
 *  Tested up to: **4.2.39**
 *  Language
 * [English (US)](https://wordpress.org/plugins/cleanup-duplicate-meta/)
 * Tags:
 * [database cleanup](https://en-ca.wordpress.org/plugins/tags/database-cleanup/)
   [meta](https://en-ca.wordpress.org/plugins/tags/meta/)[post meta](https://en-ca.wordpress.org/plugins/tags/post-meta/)
   [user meta](https://en-ca.wordpress.org/plugins/tags/user-meta/)
 *  [Advanced View](https://en-ca.wordpress.org/plugins/cleanup-duplicate-meta/advanced/)

## Ratings

 5 out of 5 stars.

 *  [  11 5-star reviews     ](https://wordpress.org/support/plugin/cleanup-duplicate-meta/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/cleanup-duplicate-meta/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/cleanup-duplicate-meta/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/cleanup-duplicate-meta/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/cleanup-duplicate-meta/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/cleanup-duplicate-meta/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/cleanup-duplicate-meta/reviews/)

## Contributors

 *   [ Tonya Mork ](https://profiles.wordpress.org/hellofromtonya/)
 *   [ WPDC ](https://profiles.wordpress.org/wpdevelopersclub/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/cleanup-duplicate-meta/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](http://wpdevelopersclub.com)