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:
- ‹Check for Duplicates› queries the database and then displays all the duplicates found.
- ‹Count Duplicates› counts all the duplicates found in the database (i.e. a total count).
- 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 for more details.
From your WordPress dashboard
- Visit ‹Plugins > Add New›
- Search for ‹Cleanup Duplicate Meta›
- Activate Cleanup Duplicate Meta from your Plugins page.
- Go to ‹Tools > Cleanup Duplicates›
- Click on the ‹Check for Duplicates› button for either Post or User Meta.
- If there are duplicates, you can then click on ‹Cleanup Post Meta› or ‹Cleanup User Meta› button.
- 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 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?
- What happens to non-duplicates when I run Cleanup?
Nothing. Cleanup Duplicate Meta does not touch non-duplicates. Therefore you’re data remains intact.
Contributors & Developers
“Cleanup Duplicate Meta” is open source software. The following people have contributed to this plugin.Contributors
Interested in development?
- Added in missing files to repo
- First release