Overview
All available WP-CLI commands for ACF and ACF PRO, with links to documentation for usage and subcommands.
Commands
| Command | Subcommand | Description |
|---|---|---|
| wp acf json | Manages ACF JSON import, export, and synchronization | |
| status | Shows the sync status for ACF items | |
| sync | Syncs local JSON changes to the database | |
| import | Imports items from a JSON file | |
| export | Exports items to a JSON file |
Global Parameters
These parameters are available for all wp acf subcommands:
--path=<path>- Path to the WordPress installation.
--url=<url>- Target site URL (for multisite).
--user=<user>- Set the WordPress user for the command.
Examples
# Show sync status for all ACF items
wp acf json status
# Sync all pending local JSON changes to database
wp acf json sync
# Export field groups to JSON files
wp acf json export --type=field-group
Requirements
- ACF 6.8 or later
- WP-CLI 2.0 or later
Supercharge Your Website With Premium Features Using ACF PRO
Speed up your workflow and unlock features to better develop websites using ACF Blocks and Options Pages, with the Flexible Content, Repeater, Clone, Gallery Fields & More.
Related
- CLI: wp acf json
- CLI: wp acf json sync
- CLI: wp acf json import
- CLI: wp acf json export
- CLI: wp acf json status