Home Forums ACF PRO Rename the field without losing existing content? Reply To: Rename the field without losing existing content?

  • You cannot just rename a field, as you’ve found and there isn’t a simple way to do this.

    There are two fields in the database that are associated with each field, not including group, repeater and flex fields.

    The meta keys for these fields are $field_name and '_'.$field_name. The first one contains the field value and the second one contains the field key index. All of these meta keys need to be altered to the new field name. A warning, if this field name is not unique site wide then trying to do this in the database will result it you loosing data for other fields with the same name.

    Since the field name is not seen, if you’re goal is to change the label so it makes more sense I would just change the label and leave the field name alone. Outside of dev for use in ACF function the name of a field really does not matter.