Support

Account

Home Forums Backend Issues (wp-admin) Where do fields live in the database?

Solved

Where do fields live in the database?

  • Hi there,
    Where would the custom field groups reside in my database? We’ve wound up with a bunch of errors after changing a field type and are trying to see if we can fix them by accessing the field itself via the database, but we’re having trouble finding the field groups themselves.

    Help???

    ~Laura

  • In ACF 4 the field groups are save as a post in the post table with a post type of “acf”. This hold the record of the field group. The fields and other settings for the field group live in the postmeta table and you’ll find everything for the field group by looking for the post_id of the acf post. Most of the data is stored as serialized arrays, so be careful editing them.

    In ACF 5, there are two post types “acf-field-group” and “acf-field”. the acf-field post type are child posts of the acf-field-group post type. First you need to find the parent group ID and then search for acf-field posts with that parent id. The group and field information are both saved in the post table post_content column as serialized arrays, again, be careful editing this.

  • Many thanks. That helped loads 🙂

  • If I were to delete the acf-field-group and acf-field post types from the DB (not even sure how to do this yet) would that essentially remove all records referencing ACF from my database? I looking to do this because I have cloned and recycled my website multiple times and now have a huge amount of records in the DB that are no longer necessary or applicable. I want to reduce the size of my database and delete all records for fields that no longer exist or are not being used. I am willing to delete my entire ACF and rebuild it with the current fields I need to use.

    “In ACF 5, there are two post types “acf-field-group” and “acf-field”. the acf-field post type are child posts of the acf-field-group post type. First you need to find the parent group ID and then search for acf-field posts with that parent id. The group and field information are both saved in the post table post_content column as serialized arrays, again, be careful editing this.”

  • Deleting field groups and fields from field groups does not delete any data related to those fields added when editing a post of other location, it only deletes the field group and field information. There isn’t anything built into ACF that will delete the information entered into fields for posts. The only built in way to delete post_meta from other post types would be do delete those posts and this will cause WP to clean up the post_meta values for those posts.

Viewing 5 posts - 1 through 5 (of 5 total)

The topic ‘Where do fields live in the database?’ is closed to new replies.