I was genuinely excited about the Secrets API. When the developer note landed on Make WordPress Core on November 11, 2026, I read it twice: finally, WordPress would give plugins a proper, encrypted place to store API keys instead of leaving them in the database as plain text.
Then, on November 17, core pulled it. Six days is all the most interesting security feature of WordPress 7.2 survived between announcement and removal. If you tested the beta, you might have a WP_SECRETS_KEY sitting in a wp-config.php file right now for a feature that is no longer coming, at least not in 7.2.
Here is what the Secrets API was, why it got pulled, and what to do about it.
What the Secrets API was supposed to do
If you have managed a WordPress site that talks to an outside service, you know WordPress security's dirty little secret: API keys and tokens usually live in the options table as plain text. Any plugin that calls Stripe, Mailchimp, or OpenAI stores its credential with update_option(), readable by anything that can read the database.
That is not hypothetical. A database dump left on a server, a leaked backup, a SQL injection flaw in some forgotten plugin — any of those hands an attacker every credential on the site in one go. I have cleaned up sites after exactly this kind of incident, and the attacker never needed to be clever. The keys were just there, waiting.
The Secrets API was core's answer: four new functions — wp_set_secret(), wp_get_secret(), wp_delete_secret(), and wp_retire_secret_version() — to store credentials encrypted at rest. A stored credential would come back as a WP_Secret object whose value stays masked when printed, logged, or dumped; only a deliberate reveal() call would show it, so a stray debug log could no longer leak your Stripe key. It also kept one previous version of every secret for safe rotation, with secrets named in a tidy plugin-slug/secret-name format.
On paper, it was the boring, foundational improvement that makes WordPress quietly better for everyone.
How it worked under the hood
The engineering was thoughtful, and worth understanding, because the design will almost certainly come back in a future release.
Values were encrypted with libsodium's XChaCha20-Poly1305 cipher, still stored in the options tables, but never autoloaded. Each secret was encrypted with a key derived from a random root key, itself encrypted with a new constant in wp-config.php: WP_SECRETS_KEY.
New installs would get the key automatically; existing sites would add it by hand, with Site Health generating the line for wp-config.php:
define( 'WP_SECRETS_KEY', 'a-base64-encoded-random-32-byte-key' );
You could also generate one yourself with php -r 'echo base64_encode( random_bytes( 32 ) ), "\n";', and three new Site Health tests would check the key, flag undecryptable secrets, and warn about credentials pending rotation.
The note stressed one warning: do not treat this key like the salts. Rotating salts after a hack is routine — everyone gets logged out once and life goes on. WP_SECRETS_KEY is different. Once secrets are stored, changing or removing it makes every one of them unreadable until the old value is put back. A genuine replacement needs a supported procedure using a WP_SECRETS_KEY_PREVIOUS constant and a WP-CLI command.
The note was honest about the limits. A database dump, a leaked backup, or a read-only SQL injection would now yield ciphertext instead of keys. But any code running on the site can read any secret — the naming scheme is a convention, not access control. This was never a vault, just a seatbelt against the dumb, common leaks.
The timeline: from announcement to revert in six days
Here is how fast this happened. On November 10, WordPress 7.2 Beta 5 was published, with the final release set for December 8. On November 11, core contributor Eric Mann published the Secrets API developer note. On November 12, the hosting team called for testing. On November 13, the note was corrected: on multisite installs, each network's root key has to be re-encrypted, not only the current network's.
Then on November 17, changeset #65538 by Peter Wilson reverted the Secrets API: "Removes the Secrets API from WordPress 7.2 to allow more time for the API to mature before it ships in a future release." The developer note was updated the same day: the Secrets API will no longer be shipping with WordPress 7.2.
Six days from announcement to removal, on the very day Release Candidate 1 was planned. That timing tells you this was not casual: something in review convinced core leadership that shipping it now would be worse than waiting.
Why core pulled it
The revert did not come out of nowhere — the debate was public, in the developer note's comments. Core contributor Ryan McCue called for the feature to be backed out of 7.2, arguing that "secrets are things that are provided to the application, not managed by it": WordPress should not manage secrets at all, and encrypted-at-rest databases already offer similar protection. Co-founder Matt Mullenweg said he shares that concern.
That is a philosophical disagreement, not a bug report. One side sees encrypted credential storage as overdue core infrastructure: plugins store secrets today, badly, and core should give them a safe default. The other side sees secrets management as the host's job, and worries a half-baked core API gives developers a false sense of security while adding a key that must never change.
Both sides have a point. I have seen too many plaintext keys in too many databases to believe the status quo is fine, and too many site owners lose access because a key was rotated carelessly to believe a "never change this" constant is risk-free. The revert is core choosing to be careful rather than first, and for a project that powers over forty percent of the web, careful is the right call — even when it is disappointing.
The key sentence in the revert is "before it ships in a future release." This is a delay, not a cancellation — the design and the thinking behind it are still there.
What this means if you tested the beta
If you tested the 7.2 beta, here is the fallout. First, nothing on your site breaks. Plugins using the Secrets API are meant to check wp_is_secrets_api_available() first and keep their old storage when it says no — credentials simply stay where they were.
Second, if you added WP_SECRETS_KEY to wp-config.php, it is now a harmless line nothing uses. If you stored secrets through the beta API, review the migration instructions in the developer note before upgrading, particularly on multisite, where each network's root key has to be re-encrypted.
Third, if you built a plugin feature on the Secrets API during the beta, do not ship it against 7.2 expecting the API to be there — gate it behind the availability check and keep your fallback storage path.
What this means if you didn't — and how I protect keys today
For most of us, the effect is simple: WordPress 7.2 will not include encrypted credential storage, and your API keys will keep living where they live today. Handle them properly, because core is not going to do it for you this release.
Here is how I protect API keys on the WordPress and Elementor sites I manage. Keep keys out of the database where you can. If your host supports it, define keys as constants in wp-config.php or, better, as environment variables. A key in an environment variable never appears in a database dump at all.
Never commit a key to version control. A .env file, a config file with a live key, a backup zip in a public folder — I have found all of these on client sites. If a key has ever touched Git, rotate it; assume it is public. Give every key the smallest scope it needs. A Stripe restricted key that can only create charges is a fundamentally different risk from a full secret key. If one leaks, the blast radius should be a nuisance, not a catastrophe.
Rotate keys on a schedule, not just after an incident. I rotate the keys on my important sites every few months, and always when someone who had access leaves a project. Watch your backups and your logs. A backup is a copy of your database, and a copy of your database is a copy of your keys. Encrypt backups, restrict who can download them, and never let a debug log capture a credential.
None of this is new or clever. That is the point. The Secrets API was exciting because it would have made the safe thing the default. While we wait for it to mature, the safe thing is still manual — and still worth doing.
What to watch before December 8 and beyond
WordPress 7.2 is still coming on December 8, 2026: Beta 5 already includes security, accessibility, and compatibility refinements, email notifications for new application passwords, and all known PHP 8.6 compatibility issues resolved. The loss of the Secrets API does not change any of that.
What I will be watching is what happens to the Secrets API next. The ticket behind it, Trac #66187, is reopened, and the design work is public. It could land in a future release with better guidance, or the debate could end with core blessing a convention for reading secrets from the environment instead. Either way, do not keep pasting keys into plugin settings fields without thinking about where they go.
Conclusion
I wanted the Secrets API in WordPress 7.2, and I still want it in a future release once it has matured. But I am glad the decision was made now, in the open, rather than after release, when a flaw would have been locked in for millions of sites.
If you tested the beta, clean up after it: check the migration notes and do not ship against an API that is no longer there. If you did not, nothing changes for you on December 8 — except that you now know how exposed plaintext credentials are. The feature got pulled. The problem did not. Go fix that part yourself, today, on your own sites. I am doing the same on mine.
FAQ
Is the Secrets API gone forever?
No. Changeset #65538 removes it from WordPress 7.2 specifically "to allow more time for the API to mature before it ships in a future release." The design and Trac ticket (#66187) remain active, and the feature may return once the open questions are resolved.
I added WP_SECRETS_KEY to wp-config.php during the beta. Should I remove it?
You can leave it — it is now a harmless constant that nothing reads. Removing it is safe too, unless secrets were stored through the beta API. If they were, read the migration notes in the developer note first, especially on multisite installs.
Will WordPress 7.2 still release on December 8, 2026?
Yes. The revert only removes the Secrets API; the rest of 7.2 is unaffected.
Why did core pull the feature instead of fixing it?
The disagreement was about design, not a bug. Contributors including Ryan McCue argued secrets should be provided to the application by the environment rather than managed by WordPress itself, a concern Matt Mullenweg said he shares. Core chose to give the API more time to mature.
How should I store API keys in WordPress now?
Use environment variables or constants in wp-config.php, keep keys out of version control and database dumps, scope each key to the minimum permissions it needs, and rotate keys regularly. Plugins that want to adopt the Secrets API later should check wp_is_secrets_api_available() and keep a fallback.
Does this affect Elementor or my page builder?
No. The Secrets API was a core feature for plugin developers. Elementor, your theme, and your existing plugins are unaffected, and nothing about how you build pages changes.
