Home › Forums › General Issues › Move from PHP registered fields to ACF UI › Reply To: Move from PHP registered fields to ACF UI
Getting them from PHP into ACF admin will depend on what version of ACF you are using.
The first step is to get the field group into a format that can be imported.
Just after you’ve created the field group in PHP you need to add some code (temporary) that will format the field group for importing and save it as a file. For ACF5 you just need to use json_encode($field_group);
I don’t know how to tell you to format the group for ACF4. I think it uses a standard WP type of import XML file.
http://php.net/manual/en/function.file-put-contents.php
As far as keeping the values, as long as your field names and field keys are the same as those generated by PHP then none of your values will be lost.
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!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.