What are they?
The WordPress security keys are eight random strings of characters, used to beef up the security of your cookies and passwords. More accurately, there’s four security keys and four corresponding salts – salts are extra strings that make it harder to crack passwords by adding extra pieces to them.
Why use them?
All too often, people use incredibly simple passwords that are easy to crack by using brute force attacks. WordPress security keys help to encrypt information in users’ cookies more securely, making your installation much more secure. They are not a substitute for creating a good password however and you should still employ sound password-creating practices such as including combinations of upper-case and lower-case letters, symbols, punctuation and numbers.
In short, security keys are like an extra bolt on the door – just one more thing to break in order to gain access.
How to use them
Adding security keys to your WordPress installation is actually a fairly simple task, so long as you are confident editing a PHP file.
All you need to do is find your wp-config.php in the root of your installation and open it for editing. Look around for the following piece of code:
The next step is to create the unique phrases for each key and salt. You are welcome to try and create them yourself, however, the more random they are, the better and a computer is far better at being random than a human. It’s also easier for a computer to create 8 60-character strings than for you, so just save yourself the trouble and use the simple key and salt generator, a free tool provided by WordPress.
Once you arrive at that page, all you have to do is copy the entire page contents and replace the eight lines of code in wp-config.php with those created for you by the generator. An example of the code that you will be presented with is:
Now save your wp-config.php and you’re set to go.
You can change these periodically if you so choose and should definitely do so if you experience a security breach. The only drawback is that any logged in users will have to log back in as their cookies will become invalid.
What other security practices do you employ on your installation?