跳至内容
  • 关于WordPress
    • 关于WordPress
    • WordPress.org
    • 文档
    • 支持
    • 反馈
  • 登录
  • 注册
WordPress.org
WordPress.org

China 简体中文

  • 主题
  • 插件
  • 最新消息
  • 支持
    • 文档
    • 论坛
  • 关于
  • 获取 WordPress
获取 WordPress

插件

  • 我的收藏
  • Beta测试
  • 开发者

该插件尚未通过WordPress的最新3个主要版本进行测试。 当与较新版本的WordPress一起使用时,可能不再受到维护或支持,并且可能会存在兼容性问题。

下载

Cleanup Duplicate Meta

作者WP Developers Club and Tonya
  • 详情
  • 评价
  • 安装
  • 技术支持
  • 开发进展

描述

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 for more details.

屏幕截图

  • 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'.

安装

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.

常见问题

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?

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.

评价

Wow! It saved my site!

Andre 2021年3月5日
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.

Works perfect

Michael Ott 2020年9月25日
Cleaned up nearly 70,000 redundant _postmeta records with just a couple of clicks. Top marks.

Still works

tomfaber 2020年9月11日
Nice tool, does what it needs to.

Tonya Mork is a GENIUS. Plugin Still working in 2020

ctrlaltdelete 2020年3月28日
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!

Old but works!!

goddess_dix 2018年9月25日
Just tried this (09/2018) and it works like a charm. Wow, that was helpful!!! Thank you.

Really handy plugin

Luke Cavanagh 2018年7月24日
Did not know this plugin existed, tested and works with the current version of WordPress (4.9.7).
阅读所有11条评价

贡献者及开发者

“Cleanup Duplicate Meta” 是开源软件。 以下人员对此插件做出了贡献。

贡献者
  • WPDC
  • Tonya Mork

将“Cleanup Duplicate Meta”翻译成您的语言。

对开发感兴趣吗?

您可以浏览代码,查看SVN仓库,或通过RSS订阅开发日志。

更新日志

Version 1.0.2

  • Added in missing files to repo

Version 1.0.1

  • First release

元信息

  • 版本:1.0.2
  • 最后更新:7年前
  • 有效安装数量:400+
  • WordPress版本: 3.5或更高
  • 最高兼容版本:4.2.32
  • 语言:
    English (US)
  • 标签:
    database cleanupmetapost metauser meta
  • 高级视图

评级

查看所有评价
  • 5星 11
  • 4星 0
  • 3星 0
  • 2星 0
  • 1星 0
登录以提交评价。

贡献者

  • WPDC
  • Tonya Mork

技术支持

最近两个月解决的问题:

总计 1,已解决 0

查看支持论坛

捐助

您愿意支持这个插件的发展吗?

捐助此插件

  • 关于
  • 最新消息
  • 主机
  • 捐助
  • 支持
  • 开发者
  • 参与
  • 学习
  • 展示站点
  • 插件
  • 主题
  • 区块样板
  • WordCamp
  • WordPress.TV
  • BuddyPress
  • bbPress
  • WordPress.com
  • Matt
  • 隐私
  • 公共代码
WordPress.org
WordPress.org

China 简体中文

  • 访问我们的 Facebook 公共主页
  • 关注我们的 Twitter 账号
代码如诗