Overview
The Gravity Forms CLI Add-On brings Gravity Forms management to the command line, making it faster to install, configure, and maintain forms and entries across your WordPress sites using WP-CLI.
Built for developers, agencies, and power users, it streamlines everyday Gravity Forms tasks—like creating or exporting forms, managing entries, sending notifications, and running maintenance tools—without needing to click through the WordPress admin.
Key Features
- ⌨️ Full Gravity Forms control via WP-CLI: Manage core Gravity Forms tasks (forms, fields, entries, notifications) directly from your terminal.
- 📦 Installation and updates made easy: Install Gravity Forms and supported add-ons, run setup/upgrade routines, and check versions with simple commands.
- 🧩 Form & field management workflows: Create, edit, duplicate, import/export, and update forms and fields—ideal for repeatable builds and CI-friendly workflows.
- 📨 Notification and entry operations: Work with entry data from the CLI (list/get/create/update/export/import) and manage notification actions including sending entry notifications.
- 🛠️ Built-in utility commands: Run maintenance tools such as clearing transients, verifying checksums, deleting trashed entries, and generating system reports.
How It Works
- Install the add-on: Install it as a WP-CLI package or as a WordPress plugin.
- Use the
gfWP-CLI command group: Runwp help gfto discover available command groups likeform,field,entry,notification,tool, andlicense. - Perform Gravity Forms actions from the terminal: Create and manage forms, import/export configurations, work with entries, and trigger useful tools—without leaving your CLI.
- Automate repeatable workflows: Use the CLI commands in scripts, deployment pipelines, or maintenance routines to standardize Gravity Forms operations across environments.
Please log in to access this content. Log in
Requirements
- WordPress 4.2+
- Gravity Forms > 1.9.17.8
- WP-CLI v2.5+
Documentation
Gravity Forms CLI Documentation
The Gravity Forms CLI Add-On lets WP-CLI users manage Gravity Forms installation, forms, fields, notifications, entries, and utilities directly from the command line.
Key Features
Manage Gravity Forms from WP-CLI
- Install and update Gravity Forms and official add-ons
- Configure and manage license keys
- Run common maintenance tools (checksums, transients, system report, etc.)
Form management commands
- Create, update, delete, duplicate, import/export, list, and retrieve forms
- Launch your system editor to edit form JSON
Field management commands
- Create, update, delete, duplicate, list, and retrieve fields
- Supports both:
wp gf form field ...wp gf field ...(alias)
Notification management commands
- Create, update, delete, duplicate, list, and retrieve notifications
- Supports both:
wp gf form notification ...wp gf notification ...(alias)
Entry management commands
- Create, update, delete, duplicate, import/export, list, and retrieve entries
- Launch your system editor to edit entry JSON
Entry notification commands
- Get and send notifications for a specific entry
Requirements
WordPress / Gravity Forms / WP-CLI
- WordPress 4.2+
- Gravity Forms > 1.9.17.8
- WP-CLI v2.5+
Installation
As a WP-CLI package (recommended)
wp package install gravityforms/gravityformscli
As a WordPress plugin
wp plugin install gravityformscli --activate
Installing directly from GitHub
wp package install https://github.com/gravityforms/gravityformscli.git
Getting Started
Discover available commands
wp help gf
Explore subcommands
wp help gf form wp help gf field wp help gf entry wp help gf tool wp gf license
Using the Add-On: Common Command Groups
Form Management
Command group:
wp gf form [command]
Supported commands:
create— Creates a new formdelete— Deletes a formduplicate— Duplicates a formedit— Launch system editor to edit the form configurationexport— Exports forms to a Gravity Forms form export filelist— Lists forms (with entry count and view counts)get— Returns the form JSONimport— Imports forms from a Gravity Forms form export fileupdate— Updates a form
Field Management
Command groups:
wp gf form field [command] wp gf field [command] # alias
Supported commands:
create— Creates a field and adds it to a formdelete— Deletes a fieldduplicate— Duplicates a fieldedit— Launch system editor to edit the field configurationget— Returns the JSON representation of a fieldlist— Displays a list of fields for a formupdate— Updates a field
Notification Management
Command groups:
wp gf form notification [command] wp gf notification [command] # alias
Supported commands:
create— Creates a new notificationdelete— Deletes a notificationduplicate— Duplicates a notificationedit— Launch system editor to edit the notification configurationlist— Lists notificationsget— Returns the notification JSONupdate— Updates a notification
Entry Management
Command group:
wp gf entry [command]
Supported commands:
create— Creates a new entry (JSON or field-value pairs)delete— Deletes an entryduplicate— Duplicates an entryedit— Launch system editor to edit the JSON representation of the entryexport— Exports entriesget— Returns a JSON representation of an entryimport— Imports entrieslist— Displays a list of entriesupdate— Updates an entry
Entry Notifications
Command group:
wp gf entry notification [command]
Supported commands:
get— Returns the notifications for the given entrysend— Sends the notifications for the given entry
Installing and Updating Gravity Forms and Add-Ons
These commands require Gravity Forms to be installed. If it is not installed yet, you can install it (and official add-ons) via WP-CLI.
Install Gravity Forms (and optionally activate)
A valid license key is required either via the GF_LICENSE_KEY constant or the --key option.
Examples:
wp gf install --key=xxxxx wp gf install --key=xxxxx --activate
Install an official Gravity Forms add-on
Examples:
wp gf install gravityformspolls --key=xxxxx wp gf install gravityformsquiz --key=xxxxx
Run database setup / upgrade
The setup command will not re-run setup unless --force is used.
Examples:
wp gf setup wp gf setup --force
Update Gravity Forms and add-ons
Examples:
wp gf update wp gf update gravityformspolls
Check installed versions
Examples:
wp gf version wp gf version gravityformspolls
Misc Tools
Command group:
wp gf tool [command]
Available tools:
clear_transientsempty-trash— Delete trashed entriesverify-checksums— Verify Gravity Forms files against checksumssystem-report— Outputs system report from Forms > System Status (supportsstatusalias)
Logging & Troubleshooting
If commands are missing or not recognized
- Confirm the package is installed:
wp package list | grep gravityforms
- Run
wp help gfto confirm thegfcommand is registered
If commands fail due to missing dependencies
- Confirm requirements:
- WordPress 4.2+
- Gravity Forms > 1.9.17.8
- WP-CLI v2.5+
- Confirm Gravity Forms is installed and active (where required)
If install/update commands fail
- Verify your Gravity Forms license key is provided via:
GF_LICENSE_KEYconstant, or- the
--keyoption
- If downloads fail, check outbound HTTP access and WP-CLI networking (proxy/firewall)