If your site uses Meta Box for custom fields, Field Forge can cover a manual/beta migration path. Meta Box stores many values in wp_postmeta using standard meta_key/meta_value pairs, but extension metadata, builder-defined groups, location rules, and custom callbacks must be verified per site before claiming a full one-click migration.
Detection
php
// Check for Meta Box data in postmeta
global $wpdb;
$meta_box_groups = $wpdb->get_results(
"SELECT DISTINCT meta_key FROM {$wpdb->postmeta}
WHERE meta_key NOT LIKE '_%'
AND meta_key NOT LIKE 'field_%'
ORDER BY meta_key"
);Migration Strategy
- Create matching field groups in Field Forge with the same field names.
- Migrate values from
wp_postmetato the Field Forge values table. - Test templates — since Field Forge supports
get_field(), update anyrwmb_meta()calls.
php
// Batch migrate Meta Box values to Field Forge
function migrate_meta_box_to_fieldforge( $post_type, $field_names ) {
$posts = get_posts( [ 'post_type' => $post_type, 'numberposts' => -1, 'fields' => 'ids' ] );
foreach ( $posts as $post_id ) {
foreach ( $field_names as $name ) {
$value = get_post_meta( $post_id, $name, true );
if ( '' !== $value && null !== $value ) {
update_field( $name, $value, $post_id );
}
}
}
}
// Usage
migrate_meta_box_to_fieldforge( 'product', [ 'price', 'sku', 'description', 'gallery' ] );Template Updates
Replace Meta Box function calls with Field Forge equivalents:
php
// Before (Meta Box)
$value = rwmb_meta( 'price' );
$images = rwmb_meta( 'gallery', [ 'size' => 'large' ] );
// After (Field Forge)
$value = get_field( 'price' );
$images = get_field( 'gallery' ); // Returns array based on return_format—