WordPress密钥生成器
为你的wp-config.php生成全新的认证密钥和salt:使用crypto.getRandomValues()在你的浏览器中运行。
define('AUTH_KEY', 'K}mL@AYb<rO6ZP*]7I,oI9LdA}5qiZ9tjsg%?)E)5M2tu>jGTXq.y8L!*zt9@&w&');
define('SECURE_AUTH_KEY', '?7^i#0<ab.^8kT^.ykjTUH{#@0GBNsS3>)KGEI_Agk?8v-G>GCI}cyQN96${nlDM');
define('LOGGED_IN_KEY', 'X-g!_6M}Xmhf$*eK-WY54bR]Czj^$QDOs.J_P.)G8.20Cr*<aD2i^8@IrFcfcZCE');
define('NONCE_KEY', 'nh!R$HI!{YW+&gP,!HVyrqHl2(_>w#nOP2}3tD)Om,K[uM6vnbh)^5AybhDVHroK');
define('AUTH_SALT', '4^xPTk,H>zVuwxoFd1M(dLZy0?[jQO_S9s1e9lM[>(e_AfkfI(ntFS}!NFTX86^v');
define('SECURE_AUTH_SALT', 'N[q6{[=7VD8[Z-wa#>q?C8C6AP?8O99#VaR6KZE!S{0tKJ}YQG6-FK$%r7XgwVp1');
define('LOGGED_IN_SALT', 'RV%8V<cqPzZeu5RJ!73$SL2*f11ysZ$GF0(0l6Ut$0{]2Usn=48^Fr]QJtmc=!YD');
define('NONCE_SALT', 'YVFuCHC&?Qi>WokWLL<2YgC[MWkemq6_rSvU(XonxTZDbvP6*yXLO7)+CeZ#YYlK');如何使用本工具
- 1
点击“重新生成”以产生全新的盐值。
- 2
将全部内容复制到剪贴板。
- 3
粘贴并覆盖wp-config.php中现有的AUTH_KEY代码块。
- 4
所有用户都将被登出(Cookie失效)——这是预期的行为。
什么是WordPress密钥生成器?
WordPress在wp-config.php中使用八个常量来加密cookie并为密码哈希加salt。每一个都必须是一段长的随机字符串。官方端点api.wordpress.org/secret-key可以提供这些密钥,但本工具使用你浏览器的加密随机数生成器在本地生成它们,因此它们绝不会经过网络传输。
常见使用场景
Setting up a brand-new WordPress install and replacing the placeholder 'put your unique phrase here' lines in wp-config.php.
Rotating keys after a suspected compromise to force-log-out every session and invalidate stolen auth cookies.
Off-boarding an admin or contractor and wanting to kill any sessions they may still hold.
Periodic security hygiene on a production site, swapping in fresh salts every several months.
Generating salts on an air-gapped or restricted machine where you would rather not call an external endpoint.
Cloning a site to staging and giving the copy its own distinct keys so the two environments do not share cookie signatures.
常见问题
我应该在什么时候轮换salt?▼
为什么要在本地生成?▼
相关工具
密码哈希生成器(PBKDF2)
使用PBKDF2-SHA256在你的浏览器中生成安全的密码哈希。比MD5或简单SHA更强,工作因子可调。
HMAC生成器
使用SHA-1、SHA-256、SHA-384或SHA-512生成HMAC签名。
AES-256加密
使用AES-256-GCM加密和解密文本。密钥通过PBKDF2-SHA256从你的口令派生而来。
2FA二维码生成器
为Google Authenticator、Authy、1Password及其他2FA应用生成TOTP二维码。
密码强度检测器
根据字符集大小和常见密码列表检测你密码的熵值。完全离线运行。
凯撒密码编码与解码工具
使用凯撒密码对文本进行编码或解码:按固定位移替换字母。