FAQ: Gravity Forms Encryption

Take a look through the most frequently asked questions. If you still have questions about this plugin, feel free to contact us.

General

How do I backup my encryption key?

Back up the configuration file shown under Forms → Settings → Encryption, normally wp-content/gf_encryption_configuration.php.

If your developer configured keys through wp-config.php or environment variables, securely back up those key values too. Keep the original keys for all encrypted data you need to retain, including older entries.

Store the backup securely and make sure you can retrieve it if the website is lost. Anyone who obtains a private or legacy symmetric key and the corresponding encrypted data may be able to read that data.

Can I recover my data if I lose my keys?

Recover the original keys from a secure backup. A newly generated key cannot decrypt data encrypted with a lost key. Without the required original private key or legacy symmetric key, the corresponding encrypted data cannot be recovered.

Is activating the plugin enough to encrypt my fields?

No. You must configure encryption keys and select Encrypt Field Value for each field you want to protect. Open Forms → Settings → Encryption, confirm Encryption is set up., and resolve configuration warnings before collecting sensitive information.

Without a public key, the plugin can save values without encrypting them. Use the installation instructions to configure and verify encryption before making the form available.

Will enabling encryption encrypt my existing entries?

Enabling Encrypt Field Value does not automatically encrypt earlier submissions. It controls encryption when the plugin saves values for that field.

Please let us know if you would like previous entries encrypted, this will help us prioritize adding this feature.

Does the plugin work with WordPress Multisite?

Yes, Gravity Forms Encryption works with WordPress Multisite. The only limitation at this time is the same encryption key is used for all sites on the multisite.

What encryption is used?

With a P-521 key pair configured, the plugin encrypts protected form values and uploaded files with AES-256-GCM. It protects the random data key using HPKE with the P-521 public key and HKDF-SHA512; the matching private key is required to decrypt it.

The openssl PHP extension is used for all cryptographic functions.

Sites using the legacy symmetric key (generated prior to version 2.0.0) continue to use AES-256-CBC with HMAC-SHA256.

What are the minimum requirements?

Gravity Forms Encryption requires PHP 7.4 or later with the openssl PHP extension. Gravity Forms must be installed and activated. We recommend installing the latest WordPress and Gravity Forms release and keeping it updated.

How can I send a link to the entry in the notification?

Since encrypted entries are removed from the notifications, you may want to link to the entry in your notification so it can be quickly viewed without finding it in the admin. You can use the {entry_url} in your Gravity Forms notification so it look like:

{all_fields}
{entry_url}

What field types can be encrypted?

We current support these field types.
– Standard Fields
— Single Line Text
— Paragraph Text
— Dropdown
— Number
— Checkboxes
— Radio Buttons
— Hidden
– Advanced Fields
— Name
— Date
— Time
— Phone
— Address
— Website
— Email Field
— File Upload
— List
— Multi Select
— Consent
– Plugin Fields
— Signature
— Image Hopper
If you need to encrypt another field type, please Contact Us with details on what you need.

How are files encrypted from the File Upload field?

Files are encrypted after upload and are stored in the same location an unencrypted file upload would be stored. Which defaults to a directory under wp-content/uploads/gravity_forms
The encrypted files are stored with a randomly generated string of characters to not reveal anything about what the file is.
The original filename is stored encrypted in the database along with the Entry so when downloading the file it will preserve the original name.

Is searching encrypted fields possible?

It is currently not possible to search for data in encrypted fields, your search must be limited to the unencrypted fields.

Can encrypted values be included in email?

By default, protected field values are replaced with placeholders in email notifications. You can customize a field’s Encrypted Field Notification Placeholder and include {entry_url} in the notification to link to the entry in WordPress.

To include readable values, enable Show Decrypted Values in Email for a notification, or Show Decrypted Value in Notification for a field. The notification option allows decrypted values for that notification; the field option allows that field’s decrypted value in notifications. Decryption requires the corresponding key to be available.

Security Warning
Please read before enabling.
These options place readable information in email. The stored entry remains encrypted, but email copies are outside that protection. TLS can protect delivery in transit; it does not ensure that copies in mailboxes, backups or recipient devices are encrypted at rest.

Can encrypted uploads be attached to notifications?

Yes, when Attach uploaded files is enabled and decrypted values are allowed for the notification or upload field.

The plugin creates temporary plaintext copies for delivery and attempts to remove them after sending. The delivered attachments are readable files; encryption of the stored upload does not protect those email copies.

Can I set my encryption key in wp-config.php?

Generate a P-521 private key and its matching public key with OpenSSL:

openssl genpkey -algorithm EC -pkeyopt ec_paramgen_curve:secp521r1 -out private.pem

openssl pkey -in private.pem -pubout -out public.pem

Alternatively, you can copy the keys you already generated out of a wp-content/gf_encryption_configuration.php file.

Add the generated keys to wp-config.php, above the “That’s all, stop editing” line:
Replace the placeholder lines below with the full contents of the matching PEM file. The public key encrypts new submissions; keep the private key backed up securely because it is needed to decrypt them.

define( 'CROSSPEAK_GRAVITYFORMS_PUBLIC_KEY', <<<'PUBLIC_KEY'
paste the contents of public.pem here
PUBLIC_KEY );

define( 'CROSSPEAK_GRAVITYFORMS_PRIVATE_KEY', <<<'PRIVATE_KEY'
paste the contents of private.pem here
PRIVATE_KEY );

The keys defined here override any corresponding values in the configuration file.

How can I set my encryption key with an environment variable?

Extending the above question about wp-config.php Generate keys or copy the generated keys from wp-content/gf_encryption_configuration.php file and put it in your environment variable.
You can use the CROSSPEAK_GRAVITYFORMS_PUBLIC_KEY and CROSSPEAK_GRAVITYFORMS_PRIVATE_KEY constants to set your encryption key.
For example, in your wp-config.php use:
define( 'CROSSPEAK_GRAVITYFORMS_PUBLIC_KEY', getenv( 'GF_ENCRYPTION_PUBLIC_KEY' ) );
define( 'CROSSPEAK_GRAVITYFORMS_PRIVATE_KEY', getenv( 'GF_ENCRYPTION_PRIVATE_KEY' ) );

Each environment variable must contain the full PEM key, including line breaks.

Will webhooks continue to work?

Yes, webhooks will continue to work as normal. The data is sent to the webhook unencrypted.

Can I still decrypt my data after my license expires?

Yes, you can continue to use the plugin after your license expires. An expired license will just prevent you from updating the plugin to a new version.

What needs to move when I migrate or restore my website?

Preserve the database, uploaded files and matching encryption configuration. A database backup alone does not include keys stored in files or environment variables.

After restoring, check the Encryption settings page and verify that an existing encrypted entry and uploaded file can be read. Do not generate replacement keys to fix a missing configuration if you still need access to existing encrypted data.

Why do I see “Encrypted – private key required to view.”?

The value uses public/private key encryption, but the site does not have a usable private key available. Restore the original matching private key through the configuration source used by your site.

Values defined in wp-config.php override the corresponding configuration-file values, including an empty private-key constant. If restoring the file does not resolve the problem, ask your developer to check for an overriding constant.

Other decryption errors may indicate a different key or damaged data. Preserve the existing configuration and contact support rather than generating new keys.

Do file downloads require a WordPress login?

The plugin’s Require login before downloading uploaded files option is off by default. Enable it under Forms → Settings → Encryption → File Downloads to require login for Gravity Forms file download links across all forms.

Other code may already require login; turning this option off does not remove those existing requirements. Login is an additional condition on Gravity Forms downloads, not a permission assignment for a particular entry or user role. Treat download links as sensitive information.