Hey,
I needed to delete a big amount of unused fields for a website we’re maintaining for years. As fields get renamed or deleted, meta fields stay unused in the database. While the size of the database gets unnecessary bigger we also had an issue in the search (since old fields were found).
I didn’t found a proper and safe solution without a heavy SQL query to remove those data. So I created a plugin using functions provided by ACF to remove unused metadata.
Create a database dump and give it a try:
https://wordpress.org/plugins/whatwedo-acf-cleaner/
Hope it helps and not just me
Cheers Marc
Hey guys,
There aren’t updates for a couple of years. And the topic isn’t super simple when conditional fields come into play.
Nevertheless, I needed to delete a big amount of unused fields for a website we’re maintaining for years. As fields get renamed or deleted, meta fields stay unused in the database. While the size of the database gets unnecessary bigger we also had an issue in the search (since old fields were found).
I didn’t found a proper and safe solution without a heavy SQL query to remove those data. So I created a plugin using functions provided by ACF to remove unused metadata.
Create a database dump and give it a try:
https://wordpress.org/plugins/whatwedo-acf-cleaner/
Hope it helps and not just me
Cheers Marc
Hey guys,
I needed to delete a big amount of unused fields for a website we’re maintaining for years. As fields get renamed or deleted, meta fields stay unused in the database. While the size of the database gets unnecessary bigger we also had an issue in the search (since old fields were found).
I didn’t found a proper and safe solution without a heavy SQL query to remove those data. So I created a plugin using functions provided by ACF to remove unused metadata.
Create a database dump and give it a try:
https://wordpress.org/plugins/whatwedo-acf-cleaner/
Hope it helps and not just me
Cheers Marc
I’m also trying to achieve this. Where you able to solve it in the meantime?
Thanks. This bug is resolved since ACF 5.5.8
It doesn’t seem that this important feature will make it into the plugin.
https://support.advancedcustomfields.com/forums/topic/flush-unused-custom-fields/
You mean this code snippet here:
https://gist.github.com/toscani/4d8fd5c5e43b1583e07b
The theme caused the issue.
I used the filter “wp_insert_post_data”, which causes ACF to fail. I used the filter with a priority of 99, maybe this is to high (didn’t tested it).
See here:
https://support.advancedcustomfields.com/forums/topic/fields-disappear-after-save/
Thanks John. The theme caused the issue.
I used the filter “wp_insert_post_data”, which causes ACF to fail. I used the filter with a priority of 99, maybe this is to high (didn’t tested it).
One ugly thing I noticed while experiencing this problem was that ACF creates multiple columns inside the database.
Is there a plan to add a feature to remove all ACF-data stored in the database? When deinstalling the plugin, acf leaves a huge data mess. The same problematic shows up when renaming fields.
Is there an update on this issue? Having the exact same problem for a long time. Using version 4.x now, which works. 5.x doesn’t.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.