WP-CLI Commands

October 26, 2026
Developers
10 views
2 min read
Updated October 26, 2026

FormGlut adds WP-CLI commands for working with forms and entries from the command line.

Stats

wp formglut stats

Shows how many forms and entries there are.

List forms

wp formglut forms list [--status=<status>] [--format=<format>]
OptionWhat it does
--statusOnly forms with this status: active, draft or closed.
--formattable (default), csv, json, yaml or count.

Example: wp formglut forms list --status=active

List entries

wp formglut entries list --form=<id> [--status=<status>] [--limit=<number>] [--format=<format>]
OptionWhat it does
--formRequired. The form ID.
--statusunread, read, spam or trash. Default: everything except spam and trash.
--limitNewest entries only. Default: 20.
--formattable (default), csv, json, yaml or count.

Example: wp formglut entries list --form=12 --limit=5

Export entries to CSV

wp formglut entries export --form=<id> [--file=<path>] [--status=<status>]
OptionWhat it does
--formRequired. The form ID.
--fileWhere to write. Default: formglut-entries-<id>-<date>.csv in the current folder.
--statusunread, read, spam or trash. Default: everything except spam and trash.

Example: wp formglut entries export --form=12 --file=/tmp/contact.csv

Delete spam

wp formglut entries delete-spam [--form=<id>] [--yes]

Permanently deletes spam entries and their uploaded files.

OptionWhat it does
--formOnly this form.
--yesDo not ask for confirmation.