Support

Account

Home Forums ACF PRO Not Migrating Data When Fields Updated? Reply To: Not Migrating Data When Fields Updated?

  • This is the way that ACF works. ACF is basically just a very big wrapper for WP functions like get_post_meta(), update_post_meta(), get_option(), update_option(), and other similar functions.

    If you created your own meta boxes without ACF and created fields with a “meta_key”, if you later decided to change that meta_key to something else, any existing values would be stored under the old meta key and not the new one.

    In either case, if you decide to rename your fields then the only solution is to do a search and replace in the database to rename all of the “meta_key”s to the new name.

    It’s also really easy to say that if you change a field name that all the old values should be updated, but it’s really not that easy to do. It’s further complicated by the fact that I could have a field named “field_X” in two different field groups associated with two different post types, now you need to update some of the field names and leave the others alone.

    In the end, it really doesn’t matter what the “field name” is, no one except the developer will ever see it, so renaming them, except for my own reasons, really isn’t important. I could have fields named “lajdslkf”, “ldalsudsdh”, and “nhdosaoh”. Not very easy to work with, but no one but me will see them, or the poor developer that ends up working on it.