Secure WordPress using Security Keys and Salts

Since WordPress 2.7, four security keys have been added to help make your WordPress site more secure. These security keys help encrypt the data that is stored in the cookies, which is data that helps WordPress identify your computer as one that is logged into your WordPress website as a certain user.

If your WordPress cookies are ever obtained by someone with bad intentions, the encrypted cookie will make it much more difficult if not impossible for this individual to compromise your website using your cookies.

These security keys are stored in your wp-config.php file, which is in the root of your WordPress directory.You’ll want to ensure that they are setup properly.

Using the File Manager in your cPanel (or any other editor that you’re comfortable with), open the wp-config.php file. Look for text similar to:

* Authentication Unique Keys and Salts.
* Change these to different unique phrases!
* You can generate these using the
* {@link secret-key service}
* You can change these at any point in time to invalidate all existing cookies.
* This will force all users to have to log in again.
* @since 2.6.0

define(‘AUTH_KEY’,         ‘tDK%X:>xy|e-Z(BXb/f(Ur8#~UzUQG-^_Cs_GHs5U-&Wb?pgn^p8(2@}IcnCa|’);
define(‘SECURE_AUTH_KEY’,  ‘D&ovlU#|CvJ##uNq}bel+^MFtT&.b9{UvR]g%ixsXhGlRJ7q!h}XWdEC[BOKXssj’);
define(‘LOGGED_IN_KEY’,    ‘MGKi8Br(&{H*~&0s;{k0<S(O:+f#WM+q|npJ-+P;RDKT:~jrmgj#/-,[hOBk!ry^’);
define(‘NONCE_KEY’,        ‘FIsAsXJKL5ZlQo)iD-pt??eUbdc{_Cn<4!d~yqz))&B D?AwK%)+)F2aNwI|siOe’);
define(‘AUTH_SALT’,        ‘7T-!^i!0,w)L#JK@pc2{8XE[DenYI^BVf{L:jvF,hf}zBf883td6D;Vcy8,S)-&G’);
define(‘SECURE_AUTH_SALT’, ‘I6V|mDZq21-J|ihb u^q0F }F_NUcyl,=obGtq*p#Ybe4a31R,r=|n#=]@]c #’);
define(‘LOGGED_IN_SALT’,   ‘w<$4c$Hmd%/*]Oom>(hdXW|0M=X={we6;Mpvtg+V.o<$|#_}qG(GaVDEsn,~*4i');
define('NONCE_SALT',       'a|#h{c5|P &xWs4IZ20c2&%4!c(/uG}W:mAvy<I44

The text above is random, and will vary based on each WordPress installation. Do not copy this code!
You want to make sure that you see these lines that start with define(‘AUTH_KEY’, define(‘SECURE_AUTH_KEY’, and so on. If you don’t see these lines, you’ll want to set this up yourself.

Manual Set Up:

Please check this link for manual setup
Copy the randomly generated values into your wp-config.php file. That’s it! When you do this, you’re changing the way that WordPress encrypts cookie data. Do this in a sense “nulls and voids” all other cookies, so if you have current users logged in, they’ll need to login again.

(Visited 80 times, 1 visits today)

Leave A Comment?