I have a quick question regarding exporting my custom fields as PHP. I’ve looked on line and in the documentation and can;t seem to find anything covering it.
I’ve got a few clients now who want to host their sites themselves so I generally export to PHP, include the files and turn off the back end sections. However I’m now getting some extra work with one or two of them that requires me to add to the existing exported custom field sections.
How can I go about adding new fields to these exported sections? Do I have to recreate them in my back and and replace my existing export?
Old question, but for this use ACF Pro. This will allow you to easily export fields and import them to the new site. When you need to make changes you can just import the fields back into a dev site, or keep the dev site available for making changes. Then make those changes and do the export and import back to the client’s site.
Personally, if a client wants to host a site themself I export the entire database when moving it and import the entire thing so it’s all set up once I move the files, then you don’t need to worry about putting ACF field groups into PHP. However the JSON export and import in Pro is great for this type of thing. If you still want to load the fields using PHP you can do this by reading in the JSON files from the export and register the field groups from that.
Hope this helps someone.
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