WP Config Options

The following constants can be defined in your site’s wp-config.php file.

Gravity Forms Constants

(*) indicates the constant should be defined before installing Gravity Forms. When defined post installation on a multisite installation, the constant will only apply to new sites added to the network.

License Key

Defining the GF_LICENSE_KEY constant will automatically pre-populate the license key when Gravity Forms is installed (*).

define( 'GF_LICENSE_KEY', 'YOUR-LICENSE-KEY-HERE' );

Importing Forms

The GF_IMPORT_FILE constant allows you to specify a Form JSON file from which a set of default forms can be pre-generated when Gravity Forms is installed (*). Follow these steps to create a Form JSON file for use with this option.

define( 'GF_IMPORT_FILE', 'http://www.domain.com/path/to/gf_import.json' );

The GF_THEME_IMPORT_FILE constant allows you to specify a Form JSON file from which a set of default forms can be pre-generated when a theme containing this option is activated. This option should be specified in your theme’s functions.php file. Follow these steps to create a Form JSON file for use with this option.

define( 'GF_THEME_IMPORT_FILE', 'path/to/gf_import.json' );

Note: The path is relative to your theme root.

Creating a Form Import JSON File

The following steps explain how to create a Form JSON file from which a set of default forms can be pre-generated when used with the GF_IMPORT_FILE or GF_THEME_IMPORT_FILE constants.

  1. Create the initial set of forms you want to replicate.
  2. Navigate to the Import/Export tool and select “Export Forms”.
  3. Select the forms you want to auto-replicate when a new site is created.
  4. Click “Export” to export them to a JSON file.
  5. Place the JSON file somewhere on your web server, such as your wp-content/uploads/ folder, or somewhere easily accessible.
  6. Replace the URL in the example code above with the URL to your Form JSON file.

reCAPTCHA v2

Defining the GF_RECAPTCHA_PUBLIC_KEY and GF_RECAPTCHA_PRIVATE_KEY constants will automatically pre-populate your reCAPTCHA v2 public and private keys when Gravity Forms is installed (*).

define( 'GF_RECAPTCHA_PUBLIC_KEY', 'YOUR-KEY-HERE' );
define( 'GF_RECAPTCHA_PRIVATE_KEY', 'YOUR-KEY-HERE' );

Disable Auto Updates

Defining the GFORM_DISABLE_AUTO_UPDATE constant will prevent WordPress automatically installing Gravity Forms updates.

define( 'GFORM_DISABLE_AUTO_UPDATE', true );

Disable Logging Notice

Defining the GF_LOGGING_DISABLE_NOTICE constant will prevent Gravity Forms displaying an admin notice when logging is enabled.

define( 'GFORM_DISABLE_AUTO_UPDATE', true );

Add-On Constants

reCAPTCHA v3

Defining the GF_RECAPTCHA_V3_SITE_KEY and GF_RECAPTCHA_V3_SECRET_KEY constants will automatically pre-populate reCAPTCHA v3 site and private keys for the reCAPTCHA add-on.

define( 'GF_RECAPTCHA_V3_SITE_KEY', 'YOUR-KEY-HERE' );
define( 'GF_RECAPTCHA_V3_SECRET_KEY', 'YOUR-KEY-HERE' );