I’ve created two custom field groups in a temporary wordpress install and would now like to use the export of them to import them into a new wordpress install, however it doesn’t seem like there’s a way.
How have others done this?
I’ve created two custom field groups in a temporary wordpress install and would now like to use the export of them to import them into a new wordpress install, however it doesn’t seem like there’s a way.
How have others done this?
You must be logged in to post a comment.
Advanced Custom Fields stores the field groups as Custom Post Types, so the XML export is compatible with the standard WordPress XML format, and can be imported using the WordPress Importer plugin.
You can also get to the install directly by visiting
/wp-admin/import.php
on your site (under Admin > Tools > Import) and clicking the WordPress link at the bottom. Once installed you just need to import the XML export file you created for the ACF field groups.For importing from ACF 4 (exported to PHP) to ACF 5 Pro I used ACF-PHP-Recovery. Works like a charm.
To build on antongorodezkiy’s answer:
His suggestion to use ACF-PHP-Recovery worked for me, but I had to make a couple of other edits first. My ACF 4.x PHP export used the function “register_field_group”. But the ACF website references the function “acf_add_local_field_group”. The property fields of both functions are almost identical — the one major difference is that the old function used ‘id’ as one of its first keys, and the new function uses ‘key’.
Making those changes to the PHP allowed the ACF-PHP-Recovery plugin to recognize my ACF data and import it.
By the way, the generated PHP goes into your functions.php file. Once you’ve used the plugin to upload the data, remove the PHP from functions.php.