Gravity Forms CLI

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.

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

  1. Install the add-on: Install it as a WP-CLI package or as a WordPress plugin.
  2. Use the gf WP-CLI command group: Run wp help gf to discover available command groups like formfieldentrynotificationtool, and license.
  3. 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.
  4. Automate repeatable workflows: Use the CLI commands in scripts, deployment pipelines, or maintenance routines to standardize Gravity Forms operations across environments.

Provide feedback here

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 form
  • delete — Deletes a form
  • duplicate — Duplicates a form
  • edit — Launch system editor to edit the form configuration
  • export — Exports forms to a Gravity Forms form export file
  • list — Lists forms (with entry count and view counts)
  • get — Returns the form JSON
  • import — Imports forms from a Gravity Forms form export file
  • update — 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 form
  • delete — Deletes a field
  • duplicate — Duplicates a field
  • edit — Launch system editor to edit the field configuration
  • get — Returns the JSON representation of a field
  • list — Displays a list of fields for a form
  • update — Updates a field

Notification Management

Command groups:

wp gf form notification [command]
wp gf notification [command]     # alias

Supported commands:

  • create — Creates a new notification
  • delete — Deletes a notification
  • duplicate — Duplicates a notification
  • edit — Launch system editor to edit the notification configuration
  • list — Lists notifications
  • get — Returns the notification JSON
  • update — 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 entry
  • duplicate — Duplicates an entry
  • edit — Launch system editor to edit the JSON representation of the entry
  • export — Exports entries
  • get — Returns a JSON representation of an entry
  • import — Imports entries
  • list — Displays a list of entries
  • update — Updates an entry

Entry Notifications

Command group:

wp gf entry notification [command]

Supported commands:

  • get — Returns the notifications for the given entry
  • send — 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_transients
  • empty-trash — Delete trashed entries
  • verify-checksums — Verify Gravity Forms files against checksums
  • system-report — Outputs system report from Forms > System Status (supports status alias)

Logging & Troubleshooting

If commands are missing or not recognized

  • Confirm the package is installed:
    • wp package list | grep gravityforms
  • Run wp help gf to confirm the gf command 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_KEY constant, or
    • the --key option
  • If downloads fail, check outbound HTTP access and WP-CLI networking (proxy/firewall)