Home Forums General Issues Flush Unused Custom Fields Reply To: Flush Unused Custom Fields

  • First of all, thanks for even spending the time and effort with the issue, I’m sure I speak for all above.

    In reference to the latter part of your last post, and keeping in mind I’m not even remotely close to having the dev knowledge you have.. but maybe sometimes someone without the knowledge could introduce something so elementary that it may have gotten overlooked 🙂

    You said, “What data do you think ACF could store to help make the clean up of data in each of the above conditions easier?

    Once again, coming from an elementary view.. If and when ACF creates a (_postmeta, _termmeta, _usermeta’, _commentmeta and options) it would also log that creation. Maybe chain it (create a relationship) of this specific creation and attach a unique serial number to it. So when it is “clean up time”, that specific and unique action was taken can then be read by ACF, and then go back and erase / clean up no longer used data.

    How could ACF overcome the limits of WP when it comes to the issue of performing all of the checking and deletion of data from the five locations where it can be stored (_postmeta, _termmeta, _usermeta’, _commentmeta and options) when each check/deletion will require calling a WP function to delete the specific data?

    Maybe not an ongoing cleaning process, but one initiated by admin when it’s an optimal time for that site. A tab / setting in admin to click “clean” button, accept warning and then clean. Obviously warning one to backup DB first.