WordPress 7.2 adds a vault for API keys on December 8. A memo to whoever keeps wp-config.php
Your payment, shipping and email plugins all keep keys somewhere in the database. WordPress 7.2 gives them a proper locked place, and one new line in wp-config.php that you must never lose or casually change.

WordPress 7.2, scheduled for December 8, 2026, adds a Secrets API that stores plugin credentials such as API keys encrypted, keeping one previous version for rotation. It only works once WP_SECRETS_KEY is set in wp-config.php. Existing sites need it added, and once secrets are stored, changing or losing that key makes them all unreadable. Back it up separately, plan for staging copies, and rotate any credential a plugin moves out of the old options table.
To: whoever keeps wp-config.php
This memo is for the person who has the file nobody else opens: the developer, the agency contact, or the owner who once followed a tutorial and still has the login. WordPress 7.2 is scheduled for December 8, and it adds something you'll be responsible for.
Right now your payment, shipping, email and analytics plugins keep their API keys in the database, usually in the options table, readable by anyone who gets a copy of it. WordPress 7.2 adds a Secrets API: a standard place for plugins to store credentials encrypted, with one previous version kept so a key can be rotated without downtime. That's a real improvement, and it comes with one new line in wp-config.php that matters more than it looks.
Sequence of work
From beta to the first plugin that uses it
- Nov 10, 2026
WordPress 7.2 Beta 5; final release scheduled for December 8.
- Nov 11 to 13
Secrets API dev note published, then corrected for multi-network installs.
- Dec 8, 2026
7.2 ships. New installs get a key; existing sites need one added.
- After that
Plugins start moving keys into the API, one update at a time.
The new line
The API needs a constant called WP_SECRETS_KEY. Without a usable one, the dev note says, the API stores nothing and every attempt to write or read a stored secret returns an error. An empty value doesn't count. Neither does the placeholder from the sample config file, or a value copied from one of the authentication keys or salts.
New installs get a key automatically; the installer fills it in with the salts. Existing sites, which is almost certainly yours, need one added. Site Health will generate the line for you to paste in below the salts.
Here's the sentence to underline. The dev note says: don't treat the key like the salts. Once secrets are stored, changing or removing the key makes every one of them unreadable until the old value comes back. Treat the new key like the key to a safe, not like the salts you rotate when something feels off. Plenty of security checklists say "regenerate your salts" after a scare, and some hosts do it for you. That's still fine for the salts. Doing the same to this key breaks every plugin that has moved its credentials over.
Treat the new key like the key to a safe, not like the salts you rotate when something feels off.
Five things to sort before December 8
First, back up the key separately. If it only lives inside wp-config.php and that file is lost or rebuilt, the encrypted secrets in your database can't be read. Put a copy wherever you keep other recovery details, with a note saying what it is.
Second, decide what staging does. The secrets live in the options table and the key lives in the config file. Copy the database to a staging site with the same key, and staging can read your live credentials. Give staging a different key, and the copied secrets won't decrypt there, which may be exactly what you want. Either way, decide on purpose.
Third, write a one-line rule for your team or agency: nobody changes WP_SECRETS_KEY without following the replacement steps in the dev note. Put it in the same place as your deploy notes, where the next person to inherit the site will actually find it.
Fourth, look at your host. Some hosts will manage secrets through their own dashboard, and a site can hand storage to an external key manager through a drop-in file. If your host offers that, ask what happens in a restore, and who holds the key.
Fifth, after 7.2 lands, check Site Health. There are three new tests under Security: one for the key's source, one that turns critical if any stored secret can't be decrypted, and one that lists credentials pending rotation.
How the work moves
Adding the key without creating a new way to lose everything
- Generate it
Use the line Site Health offers, or a random 32-byte key.
- Store a copy elsewhere
With your other recovery secrets, not only inside the site backup.
- Decide staging
Same key means staging can read live secrets; a different key means they won't decrypt.
- Write the rule
Nobody changes this key without the replacement steps.
- Check Site Health
Look at the three Secrets API tests after each plugin update.
When a plugin moves its keys over
Plugins will adopt this one update at a time, not all on December 8. When one does, the dev note's import function copies the old option into an encrypted secret, leaves the old option for the plugin to delete, and flags the secret for rotation. The reason is honest: the old value has already been through your backups in plain form. So when a plugin's changelog says it now uses the Secrets API, do what the flag suggests. Generate a new key at the provider, payment, shipping or email, and paste it in.
Two cautions from the same note are worth knowing even if you never write code. The plugin-name prefix on each secret stops plugins overwriting each other, but it isn't access control. Any code running on the site can read any secret. So this protects you from a leaked database copy, not from a bad plugin. And the functions don't check user permissions themselves, because they have to work from scheduled tasks; the plugin has to do that where a person types the value in.
There's also a detail for developers that site owners should ask about. When a secret exists but can't be read, because the key is missing or the database is down, the API returns an error rather than "nothing stored." The dev note warns that asking the user for a new credential at that moment can replace one that still works. A plugin that gets this wrong could prompt your staff to paste in a fresh key during an outage. Worth asking your developer about it.
What this means for a store
If you run a shop on WordPress, the credentials at stake are the ones that move money and customer data: your payment gateway, your shipping account, your email platform. Today a stolen database backup can expose all of them. Once those plugins move to the Secrets API and you've rotated the keys, a stolen backup is much less useful on its own. That's worth the twenty minutes this memo asks for.
One more note if your developer has been testing the betas. Earlier 7.2 betas didn't require the key; they quietly derived one from two of the existing salts, which meant rotating the salts made every secret unreadable. That fallback is gone in the current version, and the dev note lists the breaking changes and migration steps for anyone who stored secrets during testing. Update a staging copy first, as you would for any major release in a busy season, and only then the live store.
If you'd like someone to set this up properly, including staging, backups and the rotation after each plugin moves, that's part of our web applications work. Talk to us.
Related work: Sutton|Place
We build alongside the people doing the work.
Bring us the problem you’re thinking about.