Have you ever worried that your WordPress site could be hacked? With over 30% of the web running on WordPress, websites are constantly targeted by bots looking for vulnerabilities.
Luckily, there are some easy steps you can take to lock down your site security. In my 15 years as a web developer, one of the most important (and most overlooked) is rotating your SALT keys.
In this beginner-friendly guide, I’ll explain:
- What SALT keys are and why they matter
- How automating key changes dramatically improves your security
- Step-by-step instructions to configure automated rotation using Salt Shaker
Along the way, I’ll also share some of my top tips for making your WordPress site more secure. Let’s dive in!
Contents
What Are WordPress SALT Keys?
SALT keys are randomly generated encryption keys that WordPress uses to protect sensitive user information like passwords and sessions.
There are two types:
- Auth keys encrypt your users‘ login cookies so passwords are protected.
- Secure auth keys add extra encryption on top of that for even more security.
Here‘s an example of what these keys look like from a real wp-config.php file:
These keys encrypt and scramble your users‘ data so that if your site is compromised, hackers can‘t easily retrieve login info and passwords.
But why rotate these keys periodically?
Rotating Your Keys Adds an Extra Layer of Security
The more often you rotate your SALT keys, the more protected your data is in case your site is ever compromised.
Here are two examples of how it improves security:
-
Keys get exposed – If a past key ever leaked, a hacker could use it to access old user data encrypted with that key. Rotating keys regularly renders past keys useless.
-
Brute force attacks – The more encrypted data a hacker has access to, the easier it may be for them to eventually crack the encryption through brute forcing. Changing keys means they have less data to work with.
Statistics show that websites run on WordPress are hacked at least every 39 seconds. So taking steps to improve your security is vital.
The WordPress.org team recommends rotating keys at minimum every 12 months. But more frequent rotation, such as every 1-3 months, is even better.
Manually changing keys in wp-config.php can be a pain. Luckily there‘s a better way…
Automate Key Rotation with Salt Shaker Plugin
The Salt Shaker plugin makes it dead simple to implement automated SALT key rotation on your WordPress site.
Here‘s how to set it up in just a few clicks:
- Install and activate the Salt Shaker plugin.
- Go to Tools -> Salt Shaker in your WordPress dashboard.
- Check the box to "Change WP Keys and Salts automatically".
- Select your preferred schedule – daily, weekly, or monthly.
That‘s all it takes! Salt Shaker will now handle changing your SALT keys in the background automatically.
One thing to note is that changing keys will log all users out of your site. But don‘t worry – they can just log right back in with their normal password.
In my testing, I found Salt Shaker to be the simplest and most lightweight solution compared to alternatives like WPSalt and Auto Salt Key. Definitely give it a try.
A Few More Tips for Securing Your WordPress Site
Rotating your SALT keys is one of the best ways to improve WordPress security. But here are a few other best practices I recommend as well:
- Use strong passwords – Never use simple or reused passwords. Use a password manager and unique 15+ character passwords.
- Install a security plugin – Wordfence or iThemes Security can scan for threats and lock things down.
- Update WordPress and plugins – Keep everything updated to avoid vulnerabilities.
- Limit user roles – Only provide users the minimum access they need to do their job.
- Setup 2FA – Add an extra layer of protection by enabling two-factor authentication.
- Backup your site – Having regular backups lets you easily restore if ever hacked.
The more layers of security you add, the harder you make it for hackers to find a way in.
So take a few minutes to start automating your SALT key rotation using Salt Shaker. It‘s a simple but effective step towards locking down the security of your WordPress site.
Have you already implemented automated key rotation? What other tips would you suggest to improve WordPress security? Let me know in the comments!