The FBI says over 1,000 hacked WordPress sites hid ransomware lures in Google. You can open yours and see a normal page.

Details

WordPress salts

Definition

WordPress salts are secret keys in wp-config.php that help secure cookies, nonces, and related cryptographic operations.

Also called: security keys, AUTH_KEY, salt keys

Last updated

What are WordPress salts?

WordPress salts are eight secret keys in wp-config.php that WordPress uses to sign login cookies and nonces. Change them and every logged-in session ends, which is the quick way to throw out a stolen cookie.

Why it matters for WordPress

AUTH_KEY, SECURE_AUTH_KEY, and the other salts in wp-config.php make session cookies and nonces harder to forge. If those secrets leak (or you inherited a site with keys copied from a tutorial), attackers have an easier time with stolen cookies. Regenerating salts invalidates existing sessions. That is often what you want after a breach.

How it shows up in practice

  • Eight long random constants near the top of wp-config.php
  • Everyone logged out after you rotate salts (expected)
  • Compromised sites that still work for the attacker until salts and passwords both change
  • Starter configs that reused the same example keys across many sites

How to change WordPress salts

  1. Back up wp-config.php and the site.
  2. Open the WordPress.org salt generator and copy all eight lines it shows.
  3. In wp-config.php, replace the eight existing AUTH_KEY to NONCE_SALT lines with the new ones, then save.
  4. Reload the site. Everyone is logged out, so sign in again. After a compromise, change passwords at the same time.

Never commit real salts to a public repository. Keep wp-config.php out of web-reachable backup dumps.

Go deeper

Want the full walkthrough?

This page stays short on purpose. The guide covers steps, examples, and what to check on a live WordPress site.

Open full guide

Nearby ideas in the dictionary

All terms →

Questions about WordPress salts

Are WordPress salts the same as my admin password? +

No. Your password is what you type at login. Salts are long secret keys in wp-config.php that help protect cookies and nonces. After a breach you usually change both: passwords for people, and salts so old sessions stop working.

Why does regenerating salts log everyone out? +

Session cookies depend on those keys. New salts make existing cookies invalid, which is the point after a compromise. Staff and customers simply sign in again.

Larger screenshot

Enlarged image