{"id":102985,"date":"2020-05-04T09:18:14","date_gmt":"2020-05-04T14:18:14","guid":{"rendered":"https:\/\/wpengine.com\/?post_type=resource&#038;p=102985"},"modified":"2023-11-15T12:58:24","modified_gmt":"2023-11-15T18:58:24","slug":"generate-wordpress-salt-keys","status":"publish","type":"resource","link":"https:\/\/wpengine.com\/case-studies\/resources\/generate-wordpress-salt-keys\/","title":{"rendered":"What Are WordPress SALT Keys and How Do You Change Them?"},"content":{"rendered":"\n<p>When it comes to website security, your login page is one of your first lines of defense. The majority of people (and bots) who try and break into your site will do so through this one page.<\/p>\n\n\n\n<p>The strength of your password is the number-one factor that determines what kind of defense your login page puts up. <a href=\"https:\/\/wpengine.com\/support\/strong-passwords\/\" target=\"_blank\" rel=\"noreferrer noopener\">Stronger passwords<\/a> are harder for attackers to crack, but you can further protect your password from hackers by using SALT keys.&nbsp;<\/p>\n\n\n\n<p>In this article, we\u2019ll discuss what WordPress SALT keys are and why you should use them on your site. We\u2019ll then show you how to generate new SALT keys, both manually and by using a plugin. Let\u2019s get started!<\/p>\n\n\n\n\n\n<h2 class=\"wp-block-heading\">What are SALT Keys in WordPress?<\/h2>\n\n\n\n<p>SALT keys are a cryptographic tool used to secure your website\u2019s login page by &#8220;hashing&#8221; your password. This scrambles the password into a meaningless string of characters that\u2019s even harder for attackers to crack.<\/p>\n\n\n\n<p>WordPress <a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/wp_salt\/\" target=\"_blank\" rel=\"noreferrer noopener\">comes with SALT keys<\/a> by default, and they are located in your site\u2019s <em>wp-config.php<\/em> file. These SALTs are random strings of data that protect the four security keys WordPress uses.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Why Use SALT Keys in WordPress?<\/h2>\n\n\n\n<p>When you log in to WordPress, you have the option to remain logged in long term. To achieve this, WordPress stores your login data in <a href=\"https:\/\/wpengine.com\/support\/cookies-and-php-sessions\/\" target=\"_blank\" rel=\"noreferrer noopener\">cookies instead of in a PHP session<\/a>. Malicious individuals can hijack your cookies through various means, leaving your website vulnerable.&nbsp;<\/p>\n\n\n\n<p>To make it harder for attackers to use cookie data, you can take advantage of SALT keys. WordPress SALT keys encrypt your password, making it harder to guess. What\u2019s more, it\u2019s next to impossible for hackers to simply &#8220;unscramble&#8221; the result in order to get at the original password.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How Do I Change My SALT Keys in WordPress?<\/h2>\n\n\n\n<p>While SALT keys make passwords harder to crack, they are not invincible. This is why you should change your SALT keys periodically, making it even harder for attackers to break them. To change your website\u2019s SALT keys, you can use a plugin or a manual method.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Generate New SALT Keys: 2 Methods<\/h2>\n\n\n\n<p>To change your SALT keys, you\u2019ll need to generate new keys first. The easiest method is to use a plugin, but you can also generate SALTs manually. Below, we\u2019ll look at both techniques.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Method 1: Using a SALT Key Plugin<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Step 1: Download the Plugin<\/h4>\n\n\n\n<p><a href=\"https:\/\/wordpress.org\/plugins\/salt-shaker\/\" target=\"_blank\" rel=\"noreferrer noopener\">Salt Shaker<\/a> is a free WordPress plugin that enables you to automatically generate and change WordPress SALT keys:<\/p>\n\n\n\n<p>You can download and activate the plugin via the WordPress Plugin Directory, or in your dashboard\u2019s <em>Plugins<\/em> page.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Step 2: Enable Automatic SALT Changes<\/h4>\n\n\n\n<p>After activating the plugin, navigate to <em>Tools<\/em> &gt; <em>Salt Shaker<\/em>, where you will find all of its settings:<\/p>\n\n\n\n<p>You will need to check the box to automate SALT key generation and changes.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Step 3: Select the Change Frequency<\/h4>\n\n\n\n<p>After enabling automatic SALT changes, you\u2019ll need to choose their frequency. Using the drop-down menu, select how often you want the SALT keys to update:&nbsp;<\/p>\n\n\n\n<p>The frequency you choose will depend on your website\u2019s needs. The more sensitive data you handle, the more often you\u2019ll want your SALT keys to change. However, daily changes are generally considered overkill for most websites.&nbsp;&nbsp;<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Step 4: Save Your Changes<\/h4>\n\n\n\n<p>After choosing your frequency, click on the <em>Change Now<\/em> button. This will save your settings and start the automated process.<\/p>\n\n\n\n<p>To change your SALT keys only once, you should first deselect the checkbox. You can then hit&nbsp; the <em>Change Now<\/em> button.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Method 2: Manually Changing Your SALT Keys<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Step 1: Navigate to the SALT keys API<\/h4>\n\n\n\n<p>If you don\u2019t want to use a plugin, you can manually generate and change your SALT keys instead. To do this, you\u2019ll use the <a href=\"https:\/\/api.wordpress.org\/secret-key\/1.1\/salt\/\" target=\"_blank\" rel=\"noreferrer noopener\">WordPress SALT keys API<\/a> to generate new keys for your website:<\/p>\n\n\n\n<p>All the keys you need will be automatically generated. You\u2019ll just need to replace them in the <em>wp-config.php<\/em> file. You can copy the entire generated code, or copy each key individually.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Step 2: Open Your <em>wp-config.php<\/em> File<\/h4>\n\n\n\n<p>To replace your SALT keys, you will need to open the <em>wp-config.php<\/em> file for your website. Remember to <a href=\"https:\/\/wpengine.com\/support\/restore\/\" target=\"_blank\" rel=\"noreferrer noopener\">back up your site<\/a> before doing this, and <a href=\"https:\/\/wpengine.com\/resources\/what-is-a-staging-site-why-have-one\/\" target=\"_blank\" rel=\"noreferrer noopener\">use a staging environment<\/a>.<\/p>\n\n\n\n<p>You can use a <a href=\"https:\/\/wpengine.com\/support\/sftp\/\" target=\"_blank\" rel=\"noreferrer noopener\">File Transfer Protocol (FTP) client<\/a> to navigate to the root directory of your website, and locate <em>wp-config.php<\/em>. When opening the file, you should use the <em>View\/Edit<\/em> option in your FTP client.&nbsp;<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Step 3: Replace the SALT Keys<\/h4>\n\n\n\n<p>After opening your <em>wp-config.php<\/em> file, you\u2019ll need to locate the \u201cAuthentication Unique Keys and Salts\u201d section:<\/p>\n\n\n\n<p>The SALT keys in the file are your current ones, and you need to replace them with your newly-generated keys. When pasting in the new keys, be careful to not change any other parts of this file.&nbsp;<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Step 4: Save Your Changes<\/h4>\n\n\n\n<p>After replacing the SALT keys, you\u2019ll need to save your changes to the file and close it. Your FTP client will generally ask if you want to replace your existing file with the new version. Choose \u201cYes\u201d, and you\u2019re all done.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How Often Should I Change my SALT Keys?<\/h2>\n\n\n\n<p>WordPress SALT keys add an extra layer of protection to your passwords, but attackers can crack them given enough time. You can halt any progress they have made by changing your SALT keys periodically.<\/p>\n\n\n\n<p>The frequency of this change will vary depending on the traffic to your website. Daily and weekly changes are generally considered too frequent for most websites. On the other hand, biannual or annual changes may be too infrequent if you have a high-traffic website. The sweet spot is to change your SALT keys every month or quarter.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Keep Your Site Safe With WP Engine<\/h2>\n\n\n\n<p>WordPress SALT keys are an invaluable addition to your website. However, they are not invincible, and changing them provides you with the best protection. You can change these keys manually using the <a href=\"https:\/\/api.wordpress.org\/secret-key\/1.1\/salt\/\" target=\"_blank\" rel=\"noreferrer noopener\">WordPress SecretKeys API<\/a>, or with a plugin like <a href=\"https:\/\/wordpress.org\/plugins\/salt-shaker\/\" target=\"_blank\" rel=\"noreferrer noopener\">Salt Shaker<\/a>.<\/p>\n\n\n\n<p>You can also boost the security of your website by using the right web host. This leaves you with more time to focus on <a href=\"https:\/\/developer.wordpress.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">website development<\/a>. WP Engine&#8217;s <a href=\"https:\/\/wpengine.com\/secure-wordpress-hosting\/\" target=\"_blank\" rel=\"noreferrer noopener\">secure WordPress hosting<\/a> can offer you this advantage and more. <\/p>\n\n\n\n<p>Check out <a href=\"https:\/\/wpengine.com\/plans\/\" target=\"_blank\" rel=\"noreferrer noopener\">our plans<\/a> and resources if you want to create your next website on a highly performant <a href=\"https:\/\/wpengine.com\/wordpress-hosting\/\" target=\"_blank\" rel=\"noreferrer noopener\">WordPress hosting<\/a> platform!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When it comes to website security, your login page is one of your first lines of defense. The majority of people (and bots) who try and break into your site will do so through this one page. The strength of your password is the number-one factor that determines what kind of defense your login page<span class=\"tile__ellipses\">&hellip;<\/span><span class=\"tile__ellipses--animated\"><\/span><\/p>\n","protected":false},"author":1,"featured_media":147755,"template":"","resource-topic":[912,909],"resource-role":[895,896,899],"resource-type":[916],"class_list":["post-102985","resource","type-resource","status-publish","has-post-thumbnail","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>What Are WordPress SALT Keys and How Do You Change Them?<\/title>\n<meta name=\"description\" content=\"Wordpress SALT keys keep your passwords from cyber attacks even if they access your data. Learn how to automatically generate WordPress Salts with WP Engine.\" \/>\n<meta name=\"robots\" content=\"noindex, follow\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What Are SALT Keys and How Do You Change Them?\" \/>\n<meta property=\"og:description\" content=\"Wordpress SALT keys keep your passwords from cyber attacks even if they access your data. Learn how to automatically generate WordPress Salts with WP Engine.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/wpengine.com\/case-studies\/resources\/generate-wordpress-salt-keys\/\" \/>\n<meta property=\"og:site_name\" content=\"WP Engine\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/wpengine\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-15T18:58:24+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2020\/05\/salt-header.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1100\" \/>\n\t<meta property=\"og:image:height\" content=\"500\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"What Are SALT Keys and How Do You Change Them?\" \/>\n<meta name=\"twitter:description\" content=\"Wordpress SALT keys keep your passwords from cyber attacks even if they access your data. Learn how to automatically generate WordPress Salts with WP Engine.\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2020\/05\/salt-header.png\" \/>\n<meta name=\"twitter:site\" content=\"@wpengine\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/resources\/generate-wordpress-salt-keys\/\",\"url\":\"https:\/\/wpengine.com\/case-studies\/resources\/generate-wordpress-salt-keys\/\",\"name\":\"What Are WordPress SALT Keys and How Do You Change Them?\",\"isPartOf\":{\"@id\":\"https:\/\/wpengine.com\/case-studies\/#website\"},\"datePublished\":\"2020-05-04T14:18:14+00:00\",\"dateModified\":\"2023-11-15T18:58:24+00:00\",\"description\":\"Wordpress SALT keys keep your passwords from cyber attacks even if they access your data. Learn how to automatically generate WordPress Salts with WP Engine.\",\"breadcrumb\":{\"@id\":\"https:\/\/wpengine.com\/case-studies\/resources\/generate-wordpress-salt-keys\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/wpengine.com\/case-studies\/resources\/generate-wordpress-salt-keys\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/resources\/generate-wordpress-salt-keys\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/wpengine.com\/case-studies\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Resources\",\"item\":\"https:\/\/wpengine.com\/case-studies\/resources\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"What Are WordPress SALT Keys and How Do You Change Them?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/#website\",\"url\":\"https:\/\/wpengine.com\/case-studies\/\",\"name\":\"WP Engine\",\"description\":\"Managed Hosting for WordPress\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/wpengine.com\/case-studies\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/f5301455463371a10d1fc290e9ad0085\",\"name\":\"WP Engine\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d8770fe9625ca7c4601f13d9d0ab86565a6dac8cd6a77bfe2ada6d83c6837870?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d8770fe9625ca7c4601f13d9d0ab86565a6dac8cd6a77bfe2ada6d83c6837870?s=96&d=mm&r=g\",\"caption\":\"WP Engine\"},\"sameAs\":[\"https:\/\/wpengine.com\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What Are WordPress SALT Keys and How Do You Change Them?","description":"Wordpress SALT keys keep your passwords from cyber attacks even if they access your data. Learn how to automatically generate WordPress Salts with WP Engine.","robots":{"index":"noindex","follow":"follow"},"og_locale":"en_US","og_type":"article","og_title":"What Are SALT Keys and How Do You Change Them?","og_description":"Wordpress SALT keys keep your passwords from cyber attacks even if they access your data. Learn how to automatically generate WordPress Salts with WP Engine.","og_url":"https:\/\/wpengine.com\/case-studies\/resources\/generate-wordpress-salt-keys\/","og_site_name":"WP Engine","article_publisher":"https:\/\/www.facebook.com\/wpengine","article_modified_time":"2023-11-15T18:58:24+00:00","og_image":[{"width":1100,"height":500,"url":"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2020\/05\/salt-header.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_title":"What Are SALT Keys and How Do You Change Them?","twitter_description":"Wordpress SALT keys keep your passwords from cyber attacks even if they access your data. Learn how to automatically generate WordPress Salts with WP Engine.","twitter_image":"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2020\/05\/salt-header.png","twitter_site":"@wpengine","twitter_misc":{"Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/wpengine.com\/case-studies\/resources\/generate-wordpress-salt-keys\/","url":"https:\/\/wpengine.com\/case-studies\/resources\/generate-wordpress-salt-keys\/","name":"What Are WordPress SALT Keys and How Do You Change Them?","isPartOf":{"@id":"https:\/\/wpengine.com\/case-studies\/#website"},"datePublished":"2020-05-04T14:18:14+00:00","dateModified":"2023-11-15T18:58:24+00:00","description":"Wordpress SALT keys keep your passwords from cyber attacks even if they access your data. Learn how to automatically generate WordPress Salts with WP Engine.","breadcrumb":{"@id":"https:\/\/wpengine.com\/case-studies\/resources\/generate-wordpress-salt-keys\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/wpengine.com\/case-studies\/resources\/generate-wordpress-salt-keys\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/wpengine.com\/case-studies\/resources\/generate-wordpress-salt-keys\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/wpengine.com\/case-studies\/"},{"@type":"ListItem","position":2,"name":"Resources","item":"https:\/\/wpengine.com\/case-studies\/resources\/"},{"@type":"ListItem","position":3,"name":"What Are WordPress SALT Keys and How Do You Change Them?"}]},{"@type":"WebSite","@id":"https:\/\/wpengine.com\/case-studies\/#website","url":"https:\/\/wpengine.com\/case-studies\/","name":"WP Engine","description":"Managed Hosting for WordPress","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/wpengine.com\/case-studies\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/f5301455463371a10d1fc290e9ad0085","name":"WP Engine","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/wpengine.com\/case-studies\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d8770fe9625ca7c4601f13d9d0ab86565a6dac8cd6a77bfe2ada6d83c6837870?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d8770fe9625ca7c4601f13d9d0ab86565a6dac8cd6a77bfe2ada6d83c6837870?s=96&d=mm&r=g","caption":"WP Engine"},"sameAs":["https:\/\/wpengine.com"]}]}},"acf":[],"grid_image_url":"https:\/\/wpengine.com\/case-studies\/wp-content\/uploads\/2020\/05\/salt-grid.png","media-type":{"term_id":916,"name":"Article","slug":"article"},"role":"<strong>Roles:<\/strong> Agency, Developer, Site Owner","topic":"<strong>Topics:<\/strong> Performance, Security","_links":{"self":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource\/102985","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource"}],"about":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/types\/resource"}],"author":[{"embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/users\/1"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/media\/147755"}],"wp:attachment":[{"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/media?parent=102985"}],"wp:term":[{"taxonomy":"resource-topic","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-topic?post=102985"},{"taxonomy":"resource-role","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-role?post=102985"},{"taxonomy":"resource-type","embeddable":true,"href":"https:\/\/wpengine.com\/case-studies\/wp-json\/wp\/v2\/resource-type?post=102985"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}