Web Design

WordPress 7.2 Secrets API Removed: What to Clean Up and What Plugin Developers Should Do

Flat vector illustration in sage green, terracotta and cream of a garden path of square paving stones seen from above, where one freshly laid section has been lifted back up and stacked neatly to one side, the smooth sand bed exposed and a small trowel nearby, a visual for the WordPress 7.2 secrets api removed before release

With the Secrets API removed from WordPress 7.2 before release, the December 8 update will not include the encrypted credential store that the betas shipped. The dev note now opens with an update dated November 17: "The Secrets API will no longer be shipping with WordPress 7.2."

The API was announced in Beta 1 as a "standardized, secure way to store sensitive credentials." Plugins could use it to keep API keys out of plain-text options. Sites that tested it during the betas may still have leftovers. This post covers what was pulled and why, what to clean up, what plugin developers should change, and what is known about a future release. Facts are as of November 20, 2026.

The short version: if you never set up the API on a beta site, you have nothing to do. If you did, look for _wp_secret_* option rows, the manage_secrets capability and a WP_SECRETS_KEY line in wp-config.php. Re-enter any plugin credential that only lived in a secret. Plugin developers should guard every Secrets API call so 7.2 does not hit an undefined function.

Why the Secrets API was removed from 7.2

Eric Mann posted the Secrets API dev note on Make WordPress Core on November 11. The note’s November 17 update links the revert as changeset 65538 and the matching wordpress-develop commit. We could not open either page to read the commit date or message, so we report the revert through the dev note and the Hosting Team post below.

The reasons are in the comments on the dev note. Ryan McCue argued on November 12 that the design mixes secrets a platform provides with data the app manages. He also said write support is easy to get wrong. His conclusion: "I think this should be backed out of core for 7.2 until the above is resolved."

Matt Mullenweg, the 7.2 release lead, replied on November 13: "I agree with @rmccue here." He added: "It’s also not a great time to be making ourselves a target for very sensitive things like that."

Mann argued to keep it. He said most sites have no other secret channel, so their keys sit in plain text. He wrote: "Backing it out leaves it undefended for another cycle." On November 16, Peter Wilson pointed out that the API’s capabilities were added but not used when setting secrets. He found no capability checks in the code.

John Blackbourn summed up the outcome on November 17. He called the feature "sorely needed and mostly on the right track, but it needs more work."

What the WordPress 7.2 schedule looks like now

With the Secrets API removed, the rest of the release is on track. The WordPress 7.2 cycle page, last changed November 18, lists these dates:

Milestone Date Note
Release Candidate 1 November 17, 2026 Hard string freeze, branch created
Release Candidate 2 November 18, 2026 Released during 7.1.5
Release Candidate 3 November 24, 2026 Scheduled
Release Candidate 4 December 1, 2026 Scheduled
Dry run and code freeze December 7, 2026 24-hour freeze
Final release December 8, 2026 Release lead: Matt Mullenweg

The RC1 announcement does not mention the Secrets API. It keeps the December 8 date. The WordPress 7.1.5 release post says RC2 "has also been released." We covered that security release in our WordPress 7.1.5 post.

Our WordPress 7.2 RC1 post and Beta 1 checklist both listed the Secrets API as part of 7.2. With the Secrets API removed, that is no longer true. The rest of their test plans still apply.

What the Secrets API removed leaves on beta sites

The WordPress Hosting Team covered this in its call to test for 7.2, by Courtney Robertson. The post says "The Secrets API was reverted from WordPress 7.2." It adds that the revert "removes the code but not the data."

Three things stay behind on a site that ran the API on Beta 5 or earlier, per the Hosting Team:

Leftover Where it lives Suggested action
Stored secrets `_wp_secret_*` rows in the options table Re-enter any credential a plugin still needs, then delete the rows
The `manage_secrets` capability Administrator role Remove it; nothing in 7.2 uses it
`WP_SECRETS_KEY` `wp-config.php` Delete it after the rows are gone

The suggested actions are our advice, not the Hosting Team’s. Its post asks testers to report leftovers in the comments. It does not list removal steps.

Files can also stay behind. The Hosting Team says upgrading to RC1 with the core updater "leaves the Secrets files on disk." Upgrading with WP-CLI removes them. WP-CLI only does that when it can reach api.wordpress.org, and it still reports success when it skips files. If you use checksum-based integrity monitoring, expect the two upgrade paths to look different.

How to clean up after the Secrets API removed in 7.2

Most production sites never ran a beta, so this applies to staging and test sites. Work through it in order.

  1. List the stored secrets. Run wp option list --search="_wp_secret_*". The WP-CLI docs say the search flag accepts * and ? wildcards. On multisite, run it for each site with --url.

  2. Find the plugin behind each one. The dev note asked plugins to name secrets plugin-slug/secret-name, so the name usually tells you.

  3. Re-enter credentials that only lived in a secret. The dev note’s wp_import_option_as_secret() copied an option into a secret but left the original for the plugin to delete. If a plugin deleted its original, it has no readable copy on 7.2. Put the key back in the plugin’s normal settings, copied from the service or your password manager.

  4. Delete the leftover rows. Use wp option delete with each name.

  5. Remove the capability. Run wp cap remove administrator manage_secrets, using the syntax in the WP-CLI cap remove docs.

  6. Decide on WP_SECRETS_KEY. The dev note says changing or removing the key makes stored secrets unreadable. Once the rows are gone, the key protects nothing, and you can remove the line.

Do not delete WP_SECRETS_KEY first. Without it, the _wp_secret_* rows can never be decrypted. Make sure every plugin has its credentials back in normal settings, then remove the rows and the key together.

If you tested with real API keys, treat them as exposed to the same backups as the database. Rotating them at the service is cheap insurance.

What plugin developers should do now

Some plugin teams wrote code against the API during the betas. With the Secrets API removed, those functions will not exist in WordPress 7.2. In PHP, calling an undefined function is a fatal error.

  1. Guard every call. Wrap calls such as wp_set_secret() and wp_get_secret() in a function_exists() check. Fall back to your current storage when the function is missing.

  2. Do not ship a migration that deletes the old option. A site on 7.2 has nowhere to read the moved value.

  3. Keep the credential problem in view. Keys in plain-text options are still the default. We covered other ways to store them in our env-var secrets checklist and Pantheon Secrets for WordPress.

  4. Give feedback now. Blackbourn asked for more input from implementors, hosts and plugin developers. The dev note comments and Trac ticket #66187 are where that discussion lives.

Mann also maintains a feature plugin. In a November 11 reply on the dev note, he pointed to it on GitHub, with docs at secretsapi.dev. On November 12 he said it has shipped AWS Secrets Manager and HashiCorp Vault providers "for months." We have not tested it. A feature plugin is not core, so weigh it like any other dependency.

Will the Secrets API come back?

No release has been named. On November 16, Mann wrote in the dev note comments: "I’d still like to target at least 7.3 if possible." As of November 20, we found no Make WordPress Core post that sets a new target. The cycle page and the RC1 post are silent on it.

The case for the feature has not gone away. Mann’s argument is that most sites keep credentials in plain text in the options table. We made a similar point in our Connectors API encryption status check. The critics in the thread focused on the design and the timing, not on the need.

With the Secrets API removed, the open questions are about shape. McCue proposed separating read-only platform secrets from data the app manages. Wilson asked for real capability checks. Mann asked for a provider built for a real hosting platform. Any version that returns in a later release may look different from the beta code.

The Secrets API removed: what to tell clients

For most clients, the message is short. WordPress 7.2 arrives December 8 with the Secrets API removed. Their stored keys stay where they are today. Nothing changes in their plugin settings.

For clients whose staging sites ran a beta with the API, schedule the cleanup above before you copy staging back to production. A copy of _wp_secret_* rows or a stray WP_SECRETS_KEY on a live site does no harm, but it adds confusion for the next developer.

If you had planned client work around the API, such as moving AMS, CRM or payment keys into it, put that on hold. Revisit it when a release is named and the design settles.

Frequently Asked Questions

Is the Secrets API removed from WordPress 7.2 for good?

It is removed from 7.2. The dev note’s November 17 update says it “will no longer be shipping with WordPress 7.2.” Its author has said he would like to target 7.3, but no release has been set as of November 20, 2026.

Why was it pulled?

Commenters, including Ryan McCue, raised design concerns about mixing platform secrets with app data and about write support. Release lead Matt Mullenweg agreed with McCue on November 13. Peter Wilson later noted missing capability checks.

Does the 7.2 release date change?

No. The cycle page still lists December 8, 2026, with RC3 on November 24 and RC4 on December 1.

I never tested the betas. Do I need to do anything?

No. Sites that never ran the API have no leftovers. Update to 7.2 as you normally would after testing.

What does the revert leave behind on beta sites?

Per the Hosting Team: `_wp_secret_*` option rows, the `manage_secrets` capability on the administrator role, and the `WP_SECRETS_KEY` constant. Dashboard upgrades to RC1 can also leave the Secrets files on disk.

Should I delete WP_SECRETS_KEY?

Yes, once the secrets it protects are gone. Delete it last, because the stored rows cannot be read without it.

My plugin used wp_set_secret() during the betas. What breaks?

On 7.2 the function does not exist, so an unguarded call is a fatal error. Wrap calls in function_exists() and keep your old storage as the fallback.

With the Secrets API removed, where should plugin keys live?

Where they live today, unless you move them to environment variables or a host secret store such as Pantheon Secrets. Both keep keys out of the database.

Is there a way to use the API on 7.2 anyway?

Its author points to a feature plugin on GitHub, with providers for AWS Secrets Manager and HashiCorp Vault. It is not part of core, and we have not tested it.

Digital Matters

Web Design Desk