Title: whatwedo ACF Cleaner
Author: whatwedo
Published: <strong>2021 年 2 月 22 日</strong>
Last modified: 2024 年 10 月 1 日

---

搜索插件

![](https://ps.w.org/whatwedo-acf-cleaner/assets/banner-772x250.jpg?rev=2901561)

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

![](https://ps.w.org/whatwedo-acf-cleaner/assets/icon-256x256.jpg?rev=2901561)

# whatwedo ACF Cleaner

 作者：[whatwedo](https://profiles.wordpress.org/whatwedo/)

[下载](https://downloads.wordpress.org/plugin/whatwedo-acf-cleaner.1.2.2.zip)

 * [详情](https://cn.wordpress.org/plugins/whatwedo-acf-cleaner/#description)
 * [评价](https://cn.wordpress.org/plugins/whatwedo-acf-cleaner/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/whatwedo-acf-cleaner/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/whatwedo-acf-cleaner/#developers)

 [支持](https://wordpress.org/support/plugin/whatwedo-acf-cleaner/)

## 描述

We analyze the post of the selected post types against the ACF groups in use. Afterwards
we remove all data from deleted groups.
 There’s a dry run available (discovery)
to see how many fields would get removed. On the actual cleanup you get prompted
because it can’t be undone (so make a backup first).

### Contribute

Developed with ♥ by [whatwedo](https://whatwedo.ch) in Bern.
 Thanks to [TrilipuT](https://github.com/TrilipuT)
for contributing.

This plugin was initially created for our own usage to clean a big database from
old ACF data.

Check out the [GitHub repository](https://github.com/whatwedo/whatwedo-acf-cleaner)
and submit pull requests or open issues

## 屏幕截图

[⌊The option page for the plugin. You can find it in "Tools / ACF Cleaner"⌉⌊The 
option page for the plugin. You can find it in "Tools / ACF Cleaner"⌉[

The option page for the plugin. You can find it in “Tools / ACF Cleaner”

[⌊On every post type with unused data the following metabox is shown⌉⌊On every post
type with unused data the following metabox is shown⌉[

On every post type with unused data the following metabox is shown

## 安装

The plugin can be found it the WordPress Plugin Directory. Search for “ACF Cleaner”.

#### Manual Installation

 1. Upload the entire `/wwd-acf-cleaner` directory to the `/wp-content/plugins/` directory.
 2. Activate “whatwedo ACF Cleaner” through the ‘Plugins’ menu in WordPress.
 3. Do a database backup manually or use a third party tool
 4. Go to “Tools / ACF Cleaner”
 5. Select the post types you want to clean and run it

## 常见问题

### What about conditional fields

Conditional fields are not taken in account at this point. This is probably also
the issue why there’s nothing like this baked into the ACF plugin itself. Down the
road it gets pretty complex.

### Output the names of the deleted fields

We are aware that it would be handy to know which exact fields will get deleted,
so the user can analyzing the actual data. This could be integrated in a future 
release.
 We already know the name of the fields and we’re also returning them from
the server. Since they’re a lot of unordered data, we don’t do something proper 
with those in the frontend .

### Support more than just post meta

ACF allows fields for term meta, user meta etc and not just post meta. This plugin
only works with post meta for now.
 There’s a ticket in the WordPress Support page
for this: https://wordpress.org/support/topic/support-more-than-just-post-meta/.
We’re happy to accept pull requests.

## 评价

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

### 󠀁[Worked perfectly](https://wordpress.org/support/topic/worked-perfectly-344/)󠁿

 [MaryMak](https://profiles.wordpress.org/maxms/) 2026 年 5 月 26 日

Removed all entries for fields that no longer exist in ACF. Refreshingly easy.

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

### 󠀁[Really helpfull for dev](https://wordpress.org/support/topic/really-helpfull-for-dev/)󠁿

 [Alexsoluweb](https://profiles.wordpress.org/alexgmenard/) 2025 年 9 月 27 日

Really helpfull when developping/refactoring fields…Great jobs and thanks for it!

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

### 󠀁[Does exactly what it says](https://wordpress.org/support/topic/does-exactly-what-it-says-265/)󠁿

 [Greg](https://profiles.wordpress.org/gconrad0922/) 2025 年 3 月 4 日

Thank you very much, helps me trim a lot of fat from _postmeta table when building
a new site.

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

### 󠀁[WP::$tool_menu_id is deprecated](https://wordpress.org/support/topic/wptool_menu_id-is-deprecated/)󠁿

 [dimuchios84](https://profiles.wordpress.org/dimuchios84/) 2024 年 12 月 17 日

Creation of dynamic property whatwedo\AcfCleaner\WP::$tool_menu_id is deprecated
wp-content/plugins/whatwedo-acf-cleaner/class/class-wp.php:91

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

### 󠀁[Such a useful plugin for ACF. Is it abandoned though?](https://wordpress.org/support/topic/such-a-useful-plugin-for-acf-is-it-abandoned-though/)󠁿

 [Manou Allou](https://profiles.wordpress.org/manouallou/) 2024 年 7 月 4 日 2 回复

This plugin does a tremendous good job finding and cleaning old and obsolete custom
fields from the database. A must-have for database cleanup after development. While
it still works OK, it would be nice to see that it is actively maintained and updated.
The notice on the plugin's main page on the WordPress repository can turn away many
people from using it. 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. Devs, are you there?

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

### 󠀁[Great for the anal-retentive among us](https://wordpress.org/support/topic/great-for-the-anal-retentive-among-us/)󠁿

 [altimac](https://profiles.wordpress.org/altimac/) 2023 年 10 月 4 日

I have to admit, it was really bugging to know that I had all manner of ACF fields
that I had replaced, reconfigured, abandoned etc. during the dev process, and when
using any theme builder to assign ACF fields to various modules, I was seeing fields
that I had long ago abandoned. In one case I went from a custom field in a CPT, 
to a taxonomy for that CPT, and I used the same name, so that field was still in
the database with some values entered for it, and in my theme builder I saw two 
different field assignment options with the same name ;-( Yes, I could work around
that, and it is not bringing my site to a crawl or anything to have the superfluous
fields in there. But I was able to use this plugin to easily remove that field, 
along with a few others I knew I wanted to remove, and even some I had forgotten
about. So kudos for giving folks like us a way to clean all this obsolete stuff 
out of the db.

 [ 阅读所有10条评价 ](https://wordpress.org/support/plugin/whatwedo-acf-cleaner/reviews/)

## 贡献者及开发者

「whatwedo ACF Cleaner」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ whatwedo ](https://profiles.wordpress.org/whatwedo/)
 *   [ Marc Wieland ](https://profiles.wordpress.org/marcwieland95/)
 *   [ Vitaly Nikolaiev ](https://profiles.wordpress.org/trilliput/)

[帮助将「whatwedo ACF Cleaner」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/whatwedo-acf-cleaner)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/whatwedo-acf-cleaner/)，
查看[SVN仓库](https://plugins.svn.wordpress.org/whatwedo-acf-cleaner/)，或通过[RSS](https://plugins.trac.wordpress.org/log/whatwedo-acf-cleaner/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/whatwedo-acf-cleaner/)。

## 更新日志

#### 1.2.2 (2024-10-01)

 * Test if everything still works with WordPress 6.6 and PHP 8.3 and bump versions
   for the WP repo

#### 1.2.1 (2023-05-25)

 * Prevent error when no clone field is used (thanks to [melcarthus](https://wordpress.org/support/topic/undefined-array-key-_clone/)
   for reporting)

#### 1.2.0 (2023-04-20)

 * Find more orphans (repeater and clone fields)
 * Improve loading of plugin when included via a theme
 * Return notice when Advanced Custom Fields is not installed
 * Show more CPT in the list (also not public once are visible now)

#### 1.1.0 (2022-07-14)

 * Add single post metabox with detailed info for unused fields (thanks to [TrilipuT](https://github.com/TrilipuT))
 * More precise unused fields detection added (thanks to [TrilipuT](https://github.com/TrilipuT))
 * Add check if Advanced Custom Fields is installed (thanks to [sebastian_a](https://profiles.wordpress.org/sebastian_a/))
   for reporting it

#### 1.0.0 (2020-02-22)

 * First release

## 额外信息

 *  版本 **1.2.2**
 *  最后更新：**2 年前**
 *  活跃安装数量 **700+**
 *  WordPress 版本 ** 5.5 或更高版本 **
 *  已测试的最高版本为 **6.6.10**
 *  PHP 版本 ** 7.0 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/whatwedo-acf-cleaner/)
 * 标签
 * [acf](https://cn.wordpress.org/plugins/tags/acf/)[admin](https://cn.wordpress.org/plugins/tags/admin/)
   [advanced custom fields](https://cn.wordpress.org/plugins/tags/advanced-custom-fields/)
   [cleaner](https://cn.wordpress.org/plugins/tags/cleaner/)[cleanup](https://cn.wordpress.org/plugins/tags/cleanup/)
 *  [高级视图](https://cn.wordpress.org/plugins/whatwedo-acf-cleaner/advanced/)

## 评级

 4.8 星（最高 5 星）。

 *  [  9 条 5 星评价     ](https://wordpress.org/support/plugin/whatwedo-acf-cleaner/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/whatwedo-acf-cleaner/reviews/?filter=4)
 *  [  1 条 3 星评价     ](https://wordpress.org/support/plugin/whatwedo-acf-cleaner/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/whatwedo-acf-cleaner/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/whatwedo-acf-cleaner/reviews/?filter=1)

[您的评价](https://wordpress.org/support/plugin/whatwedo-acf-cleaner/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/whatwedo-acf-cleaner/reviews/)

## 贡献者

 *   [ whatwedo ](https://profiles.wordpress.org/whatwedo/)
 *   [ Marc Wieland ](https://profiles.wordpress.org/marcwieland95/)
 *   [ Vitaly Nikolaiev ](https://profiles.wordpress.org/trilliput/)

## 支持

最近两个月解决的问题：

     总计 1，已解决 0

 [查看支持论坛](https://wordpress.org/support/plugin/whatwedo-acf-cleaner/)