WordPress: Use of undefined constant SECURE_AUTH_KEY

Published by

Posted on April 06, 2019

Error: Use of undefined constant SECURE_AUTH_KEY

Issue background : I have been using the same wp-config for over 10 years now and never considered
updating the file. It was more of a set and forget type of thing. Today we updated our blog server to run on PHP 7.2 and now we are seeing this error messages in the logs. This error is effecting to admin dashboard.

The current config file has these new variables that are required

  • @since 2.6.0
    */
    define( ‘AUTH_KEY’, ‘put your unique phrase here’ );
    define( ‘SECURE_AUTH_KEY’, ‘put your unique phrase here’ );
    define( ‘LOGGED_IN_KEY’, ‘put your unique phrase here’ );
    define( ‘NONCE_KEY’, ‘put your unique phrase here’ );
    define( ‘AUTH_SALT’, ‘put your unique phrase here’ );
    define( ‘SECURE_AUTH_SALT’, ‘put your unique phrase here’ );
    define( ‘LOGGED_IN_SALT’, ‘put your unique phrase here’ );
    define( ‘NONCE_SALT’, ‘put your unique phrase here’ );

/*#@-/

You can use the api to auto generate some random characters
https://api.wordpress.org/secret-key/1.1/salt/