Field Forge can import field groups and values from ACF Pro installations. The importer copies the data and does not delete the ACF field groups or values.
Detection Sources
- Database:
acf-field-groupandacf-fieldpost types. - Local PHP: Groups registered via
acf_add_local_field_group(). - Local JSON: Group files of the ACF Local JSON feature, in the folders that ACF reads (
acf-jsonby default). - PostMeta: ACF reference keys in
wp_postmeta. This source finds fields and values, no groups.
Detection tries the sources in this order and stops at the first one that finds groups. The source value in the result is database, local, json or postmeta.
$importer = FIELDFORGE_ACF_Import::instance();
$detection = $importer->detect();
// Returns: ['found' => true, 'groups' => 5, 'fields' => 47, 'posts_with_values' => 123, 'source' => 'database']Group Import
$result = $importer->import_groups();
// Returns: ['migrated' => 5, 'errors' => 0, 'log' => [...]]Before importing database-stored groups, Field Forge de-duplicates ACF group records by key/title and keeps the record with the most direct child acf-field posts. This protects migrations from old ACF databases where an empty duplicate group exists beside the populated group and would otherwise hide nested Repeater, Group, or Flexible Content children.
Value Migration
Values are migrated in batches of 50 posts at a time.
$offset = 0;
$total = 0;
do {
$result = $importer->import_values_batch( $offset );
$total += $result['migrated'];
$offset = $result['total_offset'];
} while ( ! $result['done'] );
echo 'Migration complete. ' . $total . ' values migrated.';Field Type Mapping
| ACF Type | Field Forge Type | Notes |
|---|---|---|
text | text | Direct mapping |
textarea | textarea | Preserves new_lines |
number | number | Preserves min/max/step |
image | image | Preserves return_format |
file | file | Preserves return_format |
wysiwyg | wysiwyg | Preserves toolbar settings |
select | select | Preserves choices |
repeater | repeater | Recursive sub-field import; created only while the Pro add-on is active |
group | group | Recursive sub-field import; created only while the Pro add-on is active |
flexible_content | flexible_content | Layouts and sub-fields; created only while the Pro add-on is active |
link | link | Preserves return_format |
google_map | google_map | Native Google Map type (Free) — coordinates and address preserved |
date_time_picker | date_picker | The field becomes a Date Picker, a date box without a time. The importer does not cut the time off the value (it is copied as ACF stored it), and the date box of the post editor reads only Y-m-d |
—