bookmark_borderManaging Gravity Forms and Add-Ons with WP-CLI

By using the CLI add-on and the following root commands you can easily install and update Gravity Forms and official add-ons from the command line.

Installing Gravity Forms or an Add-On

wp gf install

Examples

  • Install Gravity Forms.

    wp gf install

  • Install Gravity Forms, replacing the installed version.

    wp gf install --force

  • Install Gravity Forms using the specified license key.

    wp gf install --key=abc123

  • Install the Gravity Forms Polls Add-On using the specified license key.

    wp gf install gravityformspolls --key=abc123

Parameters

Argument Description
[<slug>] The plugin slug.
Accepted values: gravityforms or a Gravity Forms Add-On slug.
Default: gravityforms.
[--key=<value>] A valid Gravity Forms license key.
[--version=<value>] The version to be installed.
Accepted values: auto-update or hotfix.
Default: hotfix.
[--force] Overwrites the installed version of the plugin, without prompting for confirmation.
[--activate] Activates the plugin immediately after install.
[--network-activate] Network activates the plugin immediately after install.

Updating Gravity Forms or an Add-On

wp gf update

Examples

  • Update Gravity Forms.

    wp gf update

  • Update Gravity Forms using the specified license key.

    wp gf update --key=abc123

  • Update the Gravity Forms Polls Add-On using the specified license key.

    wp gf update gravityformspolls --key=abc123

Parameters

Argument Description
[<slug>] The plugin slug.
Accepted values: gravityforms or a Gravity Forms Add-On slug.
Default: gravityforms.
[--key=<value>] A valid Gravity Forms license key.
[--version=<value>] The version to be installed.
Accepted values: auto-update or hotfix.
Default: hotfix.

Running the Database Setup

wp gf setup

Examples

  • Run the Gravity Forms database setup.

    wp gf setup

  • Force the Gravity Forms database setup.

    wp gf setup --force

  • Force the Gravity Forms Polls Add-On database setup.

    wp gf setup gravityformspolls --force

Parameters

Argument Description
[<slug>] The plugin slug.
Accepted values: gravityforms or a Gravity Forms Add-On slug.
Default: gravityforms.
[--force] Runs the setup regardless of whether it has been run before.

Checking for Updates

wp gf check-update

Examples

  • Checks if an update is available for Gravity Forms.

    wp gf check-update

  • Checks if an update is available for the Gravity Forms Polls Add-On.

    wp gf check-update gravityformspolls

Parameters

Argument Description
[<slug>] The plugin slug.
Accepted values: gravityforms or a Gravity Forms Add-On slug.
Default: gravityforms.
[--format=<value>] Defines the format in which the updates will be listed.
Accepted values: table, csv, json, yaml, and count.
Default: table.

Getting the Version

wp gf version

Examples

  • Gets the Gravity Forms version.

    wp gf version

  • Gets the Gravity Forms Polls Add-On version.

    wp gf version gravityformspolls

Parameters

Argument Description
[<slug>] The plugin slug.
Accepted values: gravityforms or a Gravity Forms Add-On slug.
Default: gravityforms.

Last modified: April 16, 2018