Home Forums ACF PRO Change Key Field Name


Change Key Field Name

  • I keep a master site with all of my ACF fields, and then export them via PHP to client sites that share the settings. Today, a field group was missing. I recreated it, but for an ACF image field, since the key field identifier is different, even though the name is the same, the images aren’t loading on the pages.

    I need to set the key field number to what it was before.

    Old: ‘key’ => ‘field_5996040f812ac’
    New: ‘key’ => ‘field_5927ac659dc3c’

    If I export to PHP and manually change, everything works fine. Is there a way to edit this on the master site? Thanks!

  • You should be able to export the field group to a JSON file. Then you can alter all of the field keys. Delete the original field group and import the altered JSON file.

    I’d back up the database first, just in case.

  • NICE! Worked beautifully. Thanks.

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

You must be logged in to reply to this topic.