NewsWebsite creationAPI secrets

Secrets API: WordPress 7.2 prepares encryption for your API keys

WordPress 7.2 is preparing a Secrets API to encrypt plugin credentials. Here are the checks to plan for migrating and restoring your site.

Mehdi B.

Co-founder · SEO & digital strategy

Secrets API: WordPress 7.2 prepares encryption for your API keys
In brief

WordPress 7.2, still in beta, includes an API for encrypting the credentials used by the extensions that adopt it. Prepare their migration on a test site and check that connections are restored using the encryption key.

On 13 November 2026, WordPress clarified the documentation of its Secrets API, planned for WordPress 7.2 to encrypt the credentials used by plugins. This change affects your site’s connections with its external services, such as payment or email sending. We advise preparing their migration on a test installation, with a full restore before any change to the public site.

API secrets: what changes with key storage?

An API key lets an extension identify itself to an external service. The new interface gives developers a common way to store these values in encrypted form. It also covers OAuth secrets, used to authenticate certain connected applications.

In the default design, the encrypted data stays in the database. The protection key is stored separately, in the WordPress configuration file. This separation reduces the exposure of the credentials when a copy of the database circulates on its own.

The API also keeps a previous version of the secret when it is replaced. This supports rotation, that is, moving from one credential to a new one. The old version is deleted once the transition is complete.

This protection has a limit: code running on the site can still read the secrets. It therefore does not replace control over the installed plugins. WordPress 7.2 also does not offer a central screen to manage all these credentials.

What are the consequences for an online shop?

Secrets API: WordPress 7.2 prepares encryption for your API keys

Take a shop that uses a payment service and an email-sending service. Start by matching each connection to its plugin and its external account. Then note who can replace the credential and how to check that the connection works.

The benefit depends on each plugin adopting the API. Moving to WordPress 7.2 does not automatically migrate all existing credentials. Ask your technical team for a precise answer for each module: does it use this storage, and from which version?

The planned import tool copies an existing credential but leaves the old value in place. It also warns that this credential must be renewed, since it already appears in backups. The work therefore includes the transfer, the deletion of the old storage and the replacement of the value with the service concerned.

For the shop, record the result of the test payment and that of the confirmation e-mail separately. A validated order is not enough to check every connection. For each one, keep a test action, an expected result and a person responsible.

How do you prepare the trials without disrupting the site?

WordPress 7.2 is still in beta: the WordPress team asks for testing on test installations, never in production. Add this check to the WordPress 7.2 and PHP 8.6 compatibility tests. Use test credentials to replay the shop’s operations.

On an upgraded site, the key named WP_SECRETS_KEY is not added automatically. Without a usable key, native storage remains unavailable. The Site Health screen helps to spot this configuration defect.

Also plan how to keep this key during server changes. A restore that replaces it makes the existing secrets unreadable. Conversely, a test copy that keeps the same key can access the shop's secrets: check the permitted connections before testing.

Which checks should you ask for before the migration?

  1. Does the secret stay out of the exports? Record a recognisable dummy value, then search for it in the database export and in the cache. Also use a control value saved without encryption to check that the search works.

  2. Does the restore bring the connections back? Restore a backup in an isolated environment, with the planned configuration. Replay the selected operations and note any errors. Document the protected location of the key and the people authorised to retrieve it.

  3. Does the installation manage several site networks? The 13 November clarification concerns migrating the first betas in this particular case. It requires re-encrypting the root key of each network, not only that of the current network. Have this configuration identified before applying the procedure.

Sources

WordPressSecurityPlugins
Mehdi B.
About the authorMehdi B.

Co-founder of Smart Impact. Hooked on the web from the start, he launched his first project in 2006: an online music magazine still running today. With close to 20 years of SEO experience, a Swiss federal diploma in marketing and a solid geek streak, he turns clients' ideas, sometimes hazy ones, into concrete digital projects with his team.

LinkedIn
Further reading