Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

How to Automatically Change WordPress SALT Keys

We recommend using strong passwords as the first step in keeping your WordPress website safe from hackers. You can add an extra layer of security with SALT keys. These special codes protect your login information, making it much harder for hackers to break in.

Think of SALT keys like a secret ingredient in a recipe. They make your passwords even more secure by adding random data that makes them difficult to guess.

This article explains how to automatically change your WordPress SALT keys to protect your website. We’ll show you how to do this easily, even if you’re not a technical expert.

Change WordPress Salt Keys

What Are SALT Security Keys?

When you log in to your WordPress website, there is an option for WordPress to remember your login credentials. This is achieved by storing the users’ authentication details in cookies. These expire after 15 days, when the user will have to log in again.

The danger is that this information could be compromised and place your website at risk, especially when using public computers.

That’s why WordPress uses security keys, or SALT keys, to protect users’ login credentials. SALTs are cryptographic tools that add extra information to your info, which provides another layer of security to your encrypted data.

The security and SALT keys are stored in the wp-config.php file, which is found in the root folder of your WordPress site. They look like this:

Security Config Keys

You can improve your WordPress security further by automatically changing your WordPress secret keys on a regular basis, such as weekly or monthly.

You could generate new SALT keys using the WordPress.org secret-key service and then change them manually using FTP. But, this process can be time-consuming and isn’t recommended if you don’t have coding experience.

With that being said, let’s take a look at how to set up an automated process to easily change security and SALT keys in WordPress.

How to Change WordPress SALT Keys

The first thing you need to do is install and activate the Salt Shaker plugin. For more details, see our guide on how to install a WordPress plugin.

Once the plugin is activated, you need to go to the Tools » Salt Shaker page in your WordPress admin to set a schedule for changing the SALT keys.

Automated Settings for Salt Keys

You must check the option to automatically ‘Change WP Keys and Salts’ and then select your schedule from the dropdown. You can automatically change the authentication keys daily, weekly, and monthly.

In case you want to change the security and SALT keys manually, then you can do so by clicking on the ‘Change Now’ button.

Note: Every time your WordPress SALT keys are changed, you and other users will be automatically logged out from your WordPress site on all devices. You can easily log back into your WordPress dashboard by going to the WordPress login page.

Expert Guides on Improving WordPress Security

We hope this article helped you automatically change the WordPress SALT keys. You may also want to see some other guides related to improving WordPress security:

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

4 CommentsLeave a Reply

  1. Karen

    Hi, I’m new with everything WP.
    I don’t have any customers/ visitors who will need to log in and use a password at this stage in my Website development. Will the Salt plug in affect just me, as the administrator logging in , or will it affect general visitors coming to my website? I mean will basic visitors need to ow have a log in? : ) . Thank you for the information on Salt.

    • WPBeginner Support

      Only you would be affected and your users would not need a login for your site.

      Admin

  2. Ron

    Are the SALTS also related to the stored user passwords in the database? Will changing SALTS cause all the user passwords to become corrupted?

    • WPBeginner Support

      Hi Ron,

      No, changing SALTS will not effect user passwords. However, changing them will force all users to login again.

      Admin

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.