We maintain a series of separate websites that use alot of ACFs, CPTs, etc. Including some custom plugins and APIs that reference the ACFs.
If we make changes on one site (Source), and want to implement those changes on the other site (Destination), can I use the Export > Import to overwrite the Destination site? Should I delete the Destination first, or will it overwrite. What if the Keys are different from one site to another?
Obviously don’t want to affect existing data so looking for best practices.
Export => Import using the ACF tools menu will overwrite the field group on the site it is imported into if the group keys match.
If fields in this group have been added or edited on the destination site all of those changes would be lost.
When doing this it is also important that all of the field keys match as well. Changing a field key will cause issues where the site it is imported into may not be able to retrieve any previously saved content.
The best way to manage plugin and theme updates is using Local JSON files. Using this method the fields groups are never actually created in the DB of the destination site. You create an acf-json folder in either your plugin or parent theme where the files are saved and then set a load point for these files. In addition to this you set private value in the json files (explained here) to prevent syncing so that the user of your plugins and themes cannot sync and modify those field groups.
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users