CMB2 Alternative — Field Forge (Visual Builder + Code API)
Download Log in
Comparison

Field Forge vs CMB2 — Visual Builder vs Code-First

Looking for a CMB2 alternative with a visual builder? Field Forge offers both visual and code-first approaches plus AI, TypeScript, and ACF compatibility.

Try Field Forge Free All Comparisons
Feature Field Forge from $35/yr Code
Field registration
Visual builder
Non-developer friendly
AI schema generation
Custom table storage
Performance on large sites
ACF compatibility
TypeScript generation
GraphQL generation
Schema versioning
Commercial support
Field types

CMB2 (Custom Metaboxes and Fields 2) is a free, open-source WordPress custom fields library. It’s distributed via GitHub and WordPress.org. It has a loyal following among experienced WordPress developers who prefer defining fields in PHP code rather than visual builders. For that specific audience, CMB2 is a legitimate tool.

But CMB2 has significant trade-offs: no visual builder (developers only), no paid support, and its organic search footprint is effectively zero (2 keywords on the official site per SEMRush data). For teams that include non-developers, or developers who want both a visual builder AND a code API, Field Forge is the better fit.


TL;DR comparison

Field Forge CMB2
Price $35/year (Personal) to $169/year (Agency) Free
Field registration Visual builder + code API Code only (PHP files)
Visual builder Yes (modern) No
Non-developer friendly Yes No (requires PHP skills)
AI schema generation Yes No
Custom table storage Yes No (wp_postmeta)
Performance on large sites 3–10x faster Same as ACF (wp_postmeta)
ACF compatibility Yes (compat layer) No
TypeScript generation Yes No
GraphQL generation Yes No
Schema versioning Yes No (use git for code files)
Commercial support Yes No (community only)
Field types 32 ~25

Where CMB2 is strong

Code-first philosophy

CMB2’s primary interface is PHP code. Fields are defined via callback functions registered on the cmb2_admin_init hook:

add_action('cmb2_admin_init', function() {
    $cmb = new_cmb2_box([
        'id'           => 'hero_section',
        'title'        => 'Hero Section',
        'object_types' => ['page'],
    ]);

    $cmb->add_field([
        'name' => 'Hero Title',
        'id'   => 'hero_title',
        'type' => 'text',
    ]);

    $cmb->add_field([
        'name' => 'Hero Image',
        'id'   => 'hero_image',
        'type' => 'file',
    ]);
});

For developers who version-control everything and never touch the WordPress admin for configuration, this workflow is ideal. Field definitions live in theme/plugin files, commit to git, deploy via CI/CD, zero database migration headaches.

Free and open source

CMB2 is GPL-licensed, free forever, and maintained by a small team of contributors. For cost-sensitive projects, you can’t beat free.

Lightweight

CMB2’s codebase is small. No admin UI to render, no heavyweight options framework. Minimal impact on page loads and admin performance.

No WordPress admin dependency

Because fields are defined in code, a developer can set up a complete custom fields system without ever opening the WordPress admin. For CLI-heavy workflows or programmatic site setup, this is an advantage.


Where Field Forge wins

Visual builder for non-developers

The biggest limitation of CMB2 is that it has no visual builder. Every field must be defined in PHP code. For teams that include:

  • Content editors who want to add fields without developer help
  • Designers who need to iterate on field group structures quickly
  • Project managers who need to set up simple content types
  • Agency clients who want to maintain their own site without hiring a developer every time

…CMB2 is a non-starter.

Field Forge offers both: a modern visual builder for non-developers and a code API for developers who prefer programmatic setup. You don’t have to choose.

AI schema generation

Field Forge is the only WordPress custom fields plugin with AI-based field group generation. CMB2 has no AI features. For teams building new field groups regularly, AI generation saves significant time.

AI schema generation feature →

Custom table storage

CMB2 uses wp_postmeta for field value storage, inheriting the same N+1 query problem that affects ACF and Meta Box. Field Forge uses a custom indexed table that runs 3–10x faster on sites with many posts or complex repeaters.

For a developer building a site they expect to grow to 10,000+ posts, this is a real architectural concern. CMB2’s wp_postmeta approach will hit performance walls that require caching workarounds. Field Forge’s custom table approach scales linearly.

Custom table storage feature →

ACF compatibility layer

CMB2 has its own API — get_post_meta($post_id, 'field_name', true) — which is WordPress native but lacks ACF’s richer formatting and relational field resolution. Migration from ACF to CMB2 requires rewriting every template reference.

Field Forge supports both the ACF-style API (get_field(), have_rows(), etc.) via the compat layer and WordPress native get_post_meta(). Code written for ACF or SCF works unchanged.

TypeScript and GraphQL for headless

CMB2 has minimal headless WordPress support. Field values are stored in wp_postmeta and exposed on the WordPress REST API, but there’s no TypeScript generation, no GraphQL schema, and no WPGraphQL integration (beyond what WordPress core provides).

Field Forge auto-generates TypeScript and GraphQL definitions for every field group. For headless WordPress teams, this is a significant productivity advantage.

TypeScript generation → · GraphQL generation →

Commercial support

CMB2 is community-supported via GitHub issues. For free open-source, this is standard. But for teams that need guaranteed response times, production site troubleshooting, and priority bug fixes, community support isn’t enough.

Field Forge provides priority email support (1 business day response) on every paid plan.

Schema versioning

Field Forge tracks field group changes as database-level revisions with one-click rollback. CMB2 relies on git history for versioning (since field definitions are in code files). Both work, but Field Forge’s approach also captures admin-UI-driven changes and provides visual diff comparison.

For CMB2 users migrating to Field Forge’s code-first mode, git still works. For teams who want database-level history on top of git, Field Forge adds that layer.


The hybrid approach

Field Forge actually offers the best of both worlds for CMB2 developers:

Visual builder for non-dev team members

Content editors and project managers can create and edit simple field groups in Field Forge’s visual builder without touching code.

Code registration for developers

Developers can register field groups via fieldforge_register_field_group() in PHP — same philosophy as CMB2, different API:

add_action('fieldforge/init', function() {
    fieldforge_register_field_group([
        'key' => 'hero-section',
        'title' => 'Hero Section',
        'fields' => [
            [
                'key' => 'hero_title',
                'label' => 'Hero Title',
                'type' => 'text',
            ],
            [
                'key' => 'hero_image',
                'label' => 'Hero Image',
                'type' => 'image',
            ],
        ],
        'location' => [
            [
                [
                    'param' => 'post_type',
                    'operator' => '==',
                    'value' => 'page',
                ],
            ],
        ],
    ]);
});

Local JSON Sync for git workflow

For developers who want git versioning without PHP registration, Field Forge’s Local JSON Sync feature saves field groups as JSON files in the theme. Commit to git like CMB2 PHP files, but with visual editing as an option.

Local JSON Sync feature →


Migration from CMB2

Field Forge can import CMB2 field definitions:

  1. Scan theme/plugin files for CMB2 hook callbacks
  2. Parse the new_cmb2_box() and add_field() calls
  3. Convert to Field Forge field group definitions
  4. Save as either visual field groups (accessible via admin) or code registrations (leave in PHP)
  5. Migrate existing field values from wp_postmeta to Field Forge’s custom table

The automatic parser handles standard CMB2 code patterns. For unusual custom field configurations or complex conditional logic, manual review may be needed. Our support team can help with edge cases.


When CMB2 is the right choice

  • You’re a solo developer who never needs non-dev team members to touch field configuration
  • Free is a hard constraint and you’re willing to accept no paid support
  • You never need a visual builder and prefer 100% code-first workflows
  • You’re building a very small site (<500 posts) where performance isn't a concern
  • You explicitly want to avoid commercial WordPress plugins on philosophical grounds

For everything else — especially teams with mixed dev/non-dev members, performance-sensitive sites, headless WordPress, or anyone who wants paid support — Field Forge is a better fit.


Frequently asked questions

Is CMB2 faster than Field Forge?

No. CMB2 uses wp_postmeta storage, which has the same N+1 query performance issues as ACF. Field Forge’s custom table storage is faster on any site with >500 posts or complex repeaters.

Can I keep using CMB2’s code-first style in Field Forge?

Yes. Field Forge has its own fieldforge_register_field_group() function for programmatic field registration. Plus Local JSON Sync lets you commit field group definitions to git as JSON files.

Does Field Forge support everything CMB2 does?

Field Forge has 32 core field types; CMB2 has ~25. All common field types are covered. For niche CMB2 types not in Field Forge, the custom field type API lets you add them.

Is the migration from CMB2 automatic?

Field Forge’s CMB2 importer handles standard code patterns automatically. For unusual custom field configurations, manual review may be needed.

What about git-based workflows?

Field Forge’s Local JSON Sync saves field groups as JSON files in your theme — commit to git like CMB2 PHP files. Alternatively, register fields via fieldforge_register_field_group() in PHP for the same code-first experience.


Ready for a visual builder with code-first option?

Get Field Forge — from $35/year →

14-day refund. CMB2 importer included. Visual builder for non-devs, code API for devs.

FAQ

Frequently Asked Questions

No. CMB2 uses wp_postmeta storage, which has the same N+1 query performance issues as ACF. Field Forge’s custom table storage is faster on any site with >500 posts or complex repeaters.

Yes. Field Forge has its own fieldforge_register_field_group() function for programmatic field registration. Plus Local JSON Sync lets you commit field group definitions to git as JSON files.

Field Forge has 32 core field types; CMB2 has ~25. All common field types are covered. For niche CMB2 types not in Field Forge, the custom field type API lets you add them.

Field Forge’s CMB2 importer handles standard code patterns automatically. For unusual custom field configurations, manual review may be needed.

Field Forge’s Local JSON Sync saves field groups as JSON files in your theme — commit to git like CMB2 PHP files. Alternatively, register fields via fieldforge_register_field_group() in PHP for the same code-first experience.

Ready to Switch to Field Forge?

Every feature included. Every plan. Starting at $35/yr.

Forge AI Assistant Online

Hi! I'm the Field Forge AI assistant. Ask me anything about the plugin — setup, features, troubleshooting, or development.

Just now
Powered by Forge AI · Browse docs