Advanced

Version control, the API, the command line, front-end forms, AI drafting, and how your data is stored.

How data is stored

Fieldstone stores field values in dedicated, indexed tables — one row per post — instead of two rows per field in wp_postmeta. Queries stay fast and your postmeta table stays clean. A postmeta mirror is on by default: it keeps a plain copy of every value where the rest of the ecosystem expects it, so WordPress export/import, backup plugins, SEO variables and search plugins keep working untouched. You can opt any field into a real database index for even faster lookups.

Local JSON & version control

Every definition — field groups, post types, taxonomies — is synced to JSON files in your theme automatically, so your field structure lives in Git and deploys with your code. On another environment, Fieldstone offers to import what's in the files. You can also export a group as PHP (Fieldstone → Tools) and register it with fstn_register_field_group().

REST API

Opt a field group into the REST API and its values appear on the post's REST response (and are writable with the right permissions) — useful for headless front-ends and the block editor.

WP-CLI

Manage Fieldstone from the command line:

# Sync Local JSON definitions
wp fstn json status
wp fstn json sync

# Rebuild the postmeta mirror (both directions)
wp fstn mirror rebuild

# Inspect the value tables
wp fstn table status

Front-end forms

fstn_form() renders a field group on the front of the site and accepts the submission — with validation, a honeypot and rate limiting. What the form targets is stored on the server, never in the page, so a submission can't be edited into writing somewhere it shouldn't.

<?php fstn_form( array(
    'group'        => 'contact_details',
    'post_id'      => 'new_post',
    'post_type'    => 'enquiry',
    'submit_label' => 'Send',
) ); ?>

See the argument reference in the plugin's Tools → docs; the essentials are the field group to render and where to save it.

Generate with AI (optional)

Describe a field group in plain language — "a recipe with ingredients, prep time and a photo" — and Fieldstone drafts the whole group for your review: correct types, choices, validation and a location rule. Or open a group you've started and ask for the fields it's missing; suggestions are added for review and never rename or replace what you built.

Off by default. The AI generator is completely inactive until you add your own Anthropic API key. Nothing is sent anywhere until then. See the plugin's "External services" note.

Import from Advanced Custom Fields

Bring existing ACF field groups across in one click, with a plain-English warning for anything that can't map one-to-one. The mapping is deterministic (no AI), and your ACF data is left untouched.