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. 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.
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!
The ACF site is currently experiencing some issues.— Advanced Custom Fields (@wp_acf) September 29, 2022
We apologize for the inconvenience and we are working hard to get it back up and running as soon as possible.
© 2022 Advanced Custom Fields.