Setyenv · Docs
  • English
  • Español
  • 中文
  • 日本語
  • العربية
  • Deutsch
  • Français
  • हिन्दी
  • Bahasa Indonesia
  • Italiano
  • Nederlands
  • Português
  • Русский
  • Türkçe

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.