WordPress Salt Generator
wp-config.php keys and salts
Generating in your browser…
Generated on your device with the Web Crypto API. Never sent or stored.
Prefer the terminal?
- WP-CLI
wp config shuffle-salts
How to use your WordPress keys and salts
Copy the value above and add it to wp-config.php, replacing the existing block of eight define() lines. Keep it out of source control: commit an .env.example with an empty value instead, and set the real value in your hosting provider's environment settings or a secrets manager.
WordPress uses these values to sign login cookies. Replacing them invalidates every existing login, so it is one of the first steps after a suspected compromise. Single quotes and backslashes are left out so the lines paste cleanly into PHP.
Is it safe to generate secrets in a browser?
Only if the secret is created locally, which is how this page works. The value comes from crypto.getRandomValues, the same cryptographically secure source browsers use for TLS keys, and it never leaves your device: there is no network request, log or analytics event that includes it.
If you prefer the command line, the commands on this page produce an equivalent secret on your own machine. Either way, use a different secret for development, staging and production, and rotate it straight away if it ever appears in a log, a screenshot or a public repository.
Frequently asked questions
Is it safe to generate salts online?
Only if they are created locally. These are made in your browser with Web Crypto and never leave your device.
Will changing the salts log users out?
Yes. Everyone, including administrators, has to log in again.