Setyenv · Docs
  • English
  • Spanish
  • Chinese
  • Japanese
  • Arabic
  • German
  • French
  • Hindi
  • Indonesian
  • Italian
  • Dutch
  • Portuguese
  • Russian
  • Turkish

WP-CLI commands

Command-line interface for managing PFM entities and records. All commands are under wp pfm.

Entity management

wp pfm entity list [--format=table|csv|json]

Lists all entities with slug, label, field count, row count, and public read/write flags.

Record operations

wp pfm record list <entity> [--limit=50] [--filter=<eql>] [--format=...]
wp pfm record create <entity> --data='{...}'

Examples:

wp pfm record list ticket --limit=20 --filter="status:open"
wp pfm record create contact --data='{"name":"Jane Doe","email":"[email protected]"}'

Permissions testing

wp pfm permission test <user-id> <entity> <read|create|write|delete>

Returns GRANT or DENY with the reason. Useful for debugging why a user can't access certain records.

Actions

wp pfm action list [--entity=<slug>] [--format=...]

Lists all actions, optionally filtered by entity.

Cache

wp pfm cache flush

Wipes all pfm_* transient counters. Use after importing records or making bulk changes that leave stale rate-limit counters.