This article includes a few extra commands which are available with the CLI Add-On for Gravity Forms.
Pre-Requisites
Clearing Transients
wp gf tool clear_transients
wp gf tool clear-transients
Clears the Gravity Forms transients.
Examples
# Successful clearing of the transients.
$ wp gf tool clear-transients
Success: Gravity Forms transients cleared successfully.
# Failed clearing of the transients.
$ wp gf tool clear_transients
Error: There was a problem clearing the Gravity Forms transients.
Emptying Trash
wp gf tool empty_trash
wp gf tool empty-trash
Delete the trashed entries.
Examples
# Successful deletion of trashed entries for all forms.
$ wp gf tool empty-trash
Success: Trash emptied successfully for all forms.
# Successful deletion of trashed entries for a specific form.
$ wp gf tool empty-trash 2
Success: Trash emptied successfully for form ID 2
Parameters
Argument | Description |
---|---|
[<form-id>] | The ID of the form to delete the entries from. Default: all forms. |
Verifying Checksums
wp gf tool verify_checksums
wp gf tool verify-checksums
Verify the Gravity Forms plugin files against the checksums.
Examples
# Successful verification of the plugin checksums.
$ wp gf tool verify-checksums
Success: Gravity Forms install verifies against checksums.
# Failed checksum verification.
$ wp gf tool verify-checksums
Warning: File doesn't exist: css/admin.min.css
Error: Gravity Forms install doesn't verify against checksums.
Parameters
Argument | Description |
---|---|
[--version=<value>] | The version number the checksums should be validated against. |
Getting the System Report
wp gf tool system_report
wp gf tool system-report
wp gf tool status
Outputs the system report from the Forms > System Status page.
Examples
# Successfully using the "system-report" command to output the system report.
$ wp gf tool system-report
Success:
### Gravity Forms ###
...
# Using the "status" alias with an older Gravity Forms version.
$ wp gf tool status
Error: The system report is only available with Gravity Forms 2.2 or greater.
Running the database setup
See the Managing Gravity Forms and Add-Ons with WP-CLI article.