Use of undefined constant NONCE_SALT
Error message
Use of undefined constant NONCE_SALT ... in Shortcode.php on line 192
Cause
Salts are secret keys in WordPress, which provide a layer of security to your site. They are defined in the wp-config.php
. If you see the error that the NONCE_SALT
is undefined, that means your wp-config.php
file does not define this salt.
The NONCE_SALT
should have been automatically generated for you when you set up your site. If you check WordPress's sample wp-config.php file you can see all salts starting from line 51.
define( 'NONCE_KEY','put your unique phrase here' );
Solution
- 1
-
Generate a new
NONCE_SALT
at WordPress salt generator - 2
-
Open your
wp-config.php
file (you can use FTP or your host's file manager) and paste the generatedNONCE_SALT
code.If you find a commend that says
/* That's all, stop editing! Happy blogging. */
, you can paste theNONCE_SALT
just after it.If you don't see this comment, you can paste paste the
NONCE_SALT
from the second line.