Bridge hooks that save ACF Flexible Content field values and reference keys into WordPress post revisions, enabling recovery after accidental data loss.
ACF Flexible Content fields store data using dynamic post meta keys:
| Layer | Example | Purpose |
|---|---|---|
| Field values | sections_0_title, sections_1_image |
Actual content |
| Ref keys | _sections_0_title, _sections_1_image |
Map field → field definition |
| Group ref | _sections |
Field group reference |
WordPress core revisions (even 6.4+) cannot track these dynamic keys. When ACF field groups are accidentally corrupted or meta keys are deleted during maintenance, all flexible content data becomes unrecoverable — even though the values still exist in the database.
This plugin hooks into WordPress's revision system to copy ACF Flexible Content meta keys to/from revision posts:
- On revision creation (
_wp_put_post_revision) — copies allsections_%and_sections_%meta - On revision restore (
wp_restore_post_revision) — restores all meta and clears ACF cache - On field group import (
acf/import_field_group) — snapshots the current state for recovery
- Automatic — No configuration needed. Works on every save and revision restore.
- Integrity Check — Detect orphaned meta keys and missing reference keys via WP-CLI or admin UI.
- Import Safety — Automatic snapshots before
acf/import_field_group()modifications. - Clean — Only affects
sections_%and_sections_%meta keys. No custom tables.
- WordPress 6.4+
- ACF Pro 6.0+
- PHP 7.4+
- Upload
acf-revisionsto/wp-content/plugins/ - Activate via Plugins screen
- Requires ACF Pro to be active
# Run integrity check on all pages
wp acf-revisions check
# Check and auto-fix issues
wp acf-revisions check --fix
# Check a specific post
wp acf-revisions check --post_id=123
# List field group snapshots
wp acf-revisions snapshots
# Test the bridge hooks
wp acf-revisions test-bridge 123// Customize monitored post types (default: page, post)
add_filter( 'acf_revisions_post_types', function( $types ) {
return array( 'page', 'post', 'my_cpt' );
} );
// Customize field group key (default: group_69577fd380786)
add_filter( 'acf_revisions_field_group_key', function( $key ) {
return 'group_my_custom_key';
} );- Initial release
- Bridge hooks for ACF flexible content meta revisioning
- Field group import snapshots
- WP-CLI commands: check, snapshots, test-bridge
- Admin tools page with integrity check
- Uninstall cleanup
- Author: CODE TOT JSC (codetot.com)
- Co-Author: Khôi Nguyễn (github.com/khoipro)
GPL v2 or later