Developer overview
This page explains how RowSprout works inside, as background for the hooks and the WP-CLI commands. The free plugin is open source: github.com/RowSprout/RowSprout.
The data model
Section titled “The data model”| Concept | Stored as |
|---|---|
| Template | A rowsprout_template post. Its content is the design every page shares. Its configuration (URL pattern, properties and groups) is JSON in the post meta _rowsprout_page_template_json. |
| Property | A column of the template: a key, a type, a label and a code. The code is used in placeholder tokens. |
| Group | A row of the template: an ID plus a value per property. Group IDs are only unique within their template, so always look a group up together with its template ID. |
| Generated page | A rowsprout_page post: a normal, public, hierarchical post type with its own permalink. Post meta _rowsprout_page_source_template_id and _rowsprout_page_source_group_id link it to its template and group. |
| Queue row | One row per group in the table {prefix}rowsprout_page_groups: template ID, group ID, generated page ID, status and when the page was last generated. |
A template can have a parent template (one level deep). Such a child template reuses its parent’s groups: its pages fill empty values from the parent’s matching group.
Placeholder tokens
Section titled “Placeholder tokens”Template titles, content, the URL pattern and copied post meta may contain tokens of the form @code_<code>_<templateId>@, for example @code_town_123@. When a page is generated, each token is replaced with that group’s value. In page builder data RowSprout replaces tokens inside the decoded block attributes or JSON (such as Elementor’s _elementor_data) and escapes values for the spot they land in, so a quote in a value cannot break the page.
Block editor Block Bindings (rowsprout/property source) work differently: the block keeps a reference to the property, and the value is resolved when the page is rendered.
How a page is generated
Section titled “How a page is generated”- Save. Saving a template runs the save handler on
save_post_rowsprout_template, whether the save comes from the classic screen, the block editor or Elementor. The selected save action decides what happens next:update_pagesqueues the affected groups,save_templateonly marks them outdated. - Mark. Without RowSprout Pro every group of the template (and of its child templates) is affected. Pro’s Smart Generate narrows that down to the groups that actually changed.
- Queue. A recurring Action Scheduler action,
rowsprout_process_groups_queue, runs every minute. It picks up to 40pendinggroups (parents before children; a child waits until its parent’s page exists) and schedules one asyncrowsprout_process_single_groupaction per group. - Build. Each action builds the page: title, content and URL with tokens replaced, the template’s post meta copied, the featured image set. The page is always updated in place, with the same post ID every time.
Nothing is built while a visitor waits: visitors get ordinary WordPress pages.
Queue statuses
Section titled “Queue statuses”| Status | Meaning |
|---|---|
stale |
Outdated, or not queued yet (saved with “Save template only”, a new group). |
pending |
Queued; the next run picks it up. |
scheduled |
Planned for a moment in the future (RowSprout Pro). |
in-process |
Handed to Action Scheduler. |
completed / failed |
The result of the last run. |
Extending RowSprout
Section titled “Extending RowSprout”- How-to guides. Worked solutions for common situations: row values in your theme, your own property type, importing rows from a spreadsheet and more.
- Hooks. RowSprout offers actions and filters for the template editor, property types, placeholders, the queue and page building. RowSprout Pro is built entirely on these hooks.
- Property types. Register your own type with
rowsprout_field_types; the page has an example. - Post meta of other plugins. Every template meta key is copied onto the pages unless you exclude it with
rowsprout_excluded_meta_keys. - Scripts and AI agents (RowSprout Pro): WP-CLI commands for the terminal, and MCP so an AI agent such as Claude can build templates, add rows and generate or plan pages. The MCP abilities are WordPress Abilities, so your own PHP can call them too.