🎉 Celebrate with 10% OFF on All Products! Use Code: GFEX10 Or Buy Any 2+ Items for 30% OFF with Code: GFEX30!

Gravity Forms Secure Data Vault Premium Add-on Setup Guide

Updated 5 min read Gravity Forms Files, Storage & Databases
On this page
  1. Video walkthrough
  2. Step 1: Install, License and Add the Key
  3. Step 2: Choose the Fields to Protect
  4. Step 3: What People See
  5. Step 4: Search Encrypted Fields
  6. Step 5: Exports and the Access Log
  7. Step 6: Encrypt Existing Entries (WP-CLI)
  8. Step 7: Change the Key (Rotation)
  9. Step 8: Personal Data Requests (GDPR)
  10. Troubleshooting

Video walkthrough

Encrypt Sensitive Gravity Forms Fields (SSN, Date of Birth) & Mask Them
Video walkthrough: encrypt sensitive Gravity Forms fields and mask them for everyone else. Watch on YouTube

Some forms collect details you would rather not keep as plain text in your database and backups: ID numbers, dates of birth, phone numbers, home addresses. The Gravity Forms Secure Data Vault Premium Add-on helps protect that sensitive data. Values of the fields you choose are encrypted before Gravity Forms saves them, only the people you choose see the real values, everyone else sees a masked version, and every view, export, search and erasure is recorded.

Good to know

  • Encryption helps protect stored data, for example in a leaked database backup. It is one part of your privacy measures, together with your hosting, access rules, backups and processes. It does not on its own make a site compliant with any regulation.
  • The key lives in wp-config.php. Keep a copy in your password manager: without it, encrypted values cannot be read by anyone, including us.
  • Encrypted fields cannot be used for payments, user registration, calculations or conditional logic on saved entries.

System Requirements & Prerequisites

  • WordPress: 6.5 or higher
  • PHP: 7.4 or higher with the sodium extension (standard since PHP 7.2)
  • Gravity Forms: 2.7 or higher
  • Access to wp-config.php to add the key; WP-CLI recommended
  • GravityExtra license: an active license key to configure forms (encryption and decryption never stop)

Step 1: Install, License and Add the Key

  1. Upload and activate the add-on, then enter your license key under Forms → Settings → Encrypted Fields.
  2. Create a key. With WP-CLI run wp gfx-pii generate-key; it prints a line such as the one below. Without WP-CLI, any 32 random bytes in base64 work.
  3. Add the line to wp-config.php above “That’s all, stop editing!” and save a copy of the key in your password manager.
  4. Reload Forms → Settings → Encrypted Fields. It shows “Encryption key found” and a short key ID. The key itself is never shown or stored in the database.
define( 'GE_PII_KEY', 'base64:...44 characters...' );

Step 2: Choose the Fields to Protect

Open the form, then Settings → Encrypted Fields:

  • Encrypt these fields: single line text, paragraph, email, phone, hidden, name, address, date, website, drop-down, radio buttons and number fields.
  • Who can see the real values: tick roles (Administrator by default) and add individual users by username, email or ID.
  • Everyone else sees: the last 4 characters (****1234) or nothing (********).
  • Notifications, confirmations and add-on feeds sent during the submission: masked values (recommended) or the real values. Choose real values only if the email or connected service is allowed to receive them; this also applies to notifications Gravity Forms sends in the background.
  • Search: allows exact-match search on encrypted fields (see Step 4).

New submissions are encrypted from now on. Entries saved earlier stay as they were until you run the encrypt command (Step 6).

Form settings with the fields to encrypt, roles allowed to see real values, masking choice, submission option and search option

Step 3: What People See

Allowed users see the real values on the Entries screen, in entry details, merge tags and exports. Everyone else sees masked values. If someone who sees a masked value edits the entry, the real value is kept. The Protected fields box on each entry shows which fields are encrypted.

The same entry for an editor who is not allowed: email, phone and ID masked

Step 4: Search Encrypted Fields

Encrypted values cannot be searched by text, so the add-on also stores a keyed fingerprint of each value. On the Entries screen choose the field, type the full value and click Search: matching is exact and ignores upper/lower case and extra spaces (phone numbers compare digits only). Partial searches such as “contains” return nothing on encrypted fields.

Step 5: Exports and the Access Log

Exports from Gravity Forms and from the GravityExtra Entry Export add-on contain real values only when the person (or the export profile owner) is allowed to see them. Otherwise the encrypted value is exported, so a spreadsheet passed around stays protected.

Forms → PII Access Log lists who viewed real values, who saw masked values, exports, searches, erasures and maintenance commands, with date, user, form, entry, fields, screen and IP address. Filter it, download it as CSV and choose how long to keep it (365 days by default).

PII Access Log with filters, CSV download and rows for searches, views and masked views

Step 6: Encrypt Existing Entries (WP-CLI)

Run a dry run first, then the real command. It works in batches, writes a backup file before changing anything and can be run again safely (values already encrypted are skipped).

wp gfx-pii status
wp gfx-pii encrypt --form=3 --dry-run
wp gfx-pii encrypt --form=3 --batch=200
# Undo with the backup file printed by the command:
wp gfx-pii restore --backup=/path/to/encrypt-20261012-...jsonl

The backup file holds the original values. It is created with private permissions in a protected uploads folder; move it off the server or delete it once you have checked the result. Use --backup=<file> if you want to store it elsewhere, or --no-backup to skip it.

Step 7: Change the Key (Rotation)

  1. Create a new key with wp gfx-pii generate-key.
  2. In wp-config.php move the current value to GE_PII_KEY_PREVIOUS and set GE_PII_KEY to the new key. Both keys can read values from now on.
  3. Run wp gfx-pii rotate --dry-run, then wp gfx-pii rotate. The command re-encrypts every value that uses the old key and rebuilds the search fingerprints.
  4. When wp gfx-pii status shows 0 values on the old key, remove GE_PII_KEY_PREVIOUS.

Step 8: Personal Data Requests (GDPR)

Under Tools → Export Personal Data and Tools → Erase Personal Data, WordPress now includes “Gravity Forms protected fields”. Entries are found by the email address in an encrypted Email field or by the user who submitted them. The export contains the real values; erasure removes the encrypted values and their search fingerprints and adds a note to the entry.

Troubleshooting

  • “No encryption key yet”: add GE_PII_KEY to wp-config.php. Until then, submissions are still saved (unencrypted) and flagged; run wp gfx-pii encrypt after adding the key.
  • A value shows ******** for an administrator: the value was encrypted with a key that is not configured (or was changed outside WordPress). Add the old key as GE_PII_KEY_PREVIOUS.
  • A CRM or email received ****1234: set “Notifications, confirmations and add-on feeds sent during the submission” to real values, if that service may receive the data.
  • Removing the add-on: run wp gfx-pii decrypt first if you want plain values back. Encrypted values cannot be read without the add-on and the key.

Still need help?

Our support team answers tickets every day, usually within a few hours.

0
0
Your Cart
Your cart is emptyReturn to Shop
🔥 FREQUENTLY BOUGHT TOGETHER
Complete Combo & Save 40%!
ITEM IN YOUR CART
Gravity Forms Klaviyo Add-on
$39.00/yr
+
🎁 RECOMMENDED ADD-ON SAVE 40% OFF
Original Price: $39.00/yr
Bundle Special Price: $23.40/yr