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).
Developed with ♥ by whatwedo in Bern.
This plugin was created for our own usage to clean a big database from old ACF data.
It’s not under active development but can be used (on your own risk).
- Upload the entire
/wwd-acf-cleanupdirectory to the
- Activate Whatwedo ACF Cleanup through the ‘Plugins’ menu in WordPress.
- Do a database backup manually or a third party tool
- Go to “Tools / ACF Cleaner”
- 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 .
Contributors & Developers
“whatwedo ACF Cleaner” is open source software. The following people have contributed to this plugin.Contributors
Interested in development?
- First release