How to Handle: Warning! WordPress encrypts user cookies in Multisite

Total
0
Shares

After setting up WordPress Multisite Network, you can get the following warning at the top of every admin page:

Warning! WordPress encrypts user cookies, but you must add the following lines to wp-config.php for it to be more secure.

Before the line /* That’s all, stop editing! Happy blogging. */ please add this code:

define( 'AUTH_KEY', 'xxxxxxxxxxxxxxxxxxxxxxx' );
define( 'SECURE_AUTH_KEY', 'xxxxxxxxxxxxxxxxxxxxxxx' );
define( 'LOGGED_IN_KEY', 'xxxxxxxxxxxxxxxxxxxxxxx' );
define( 'NONCE_KEY', 'xxxxxxxxxxxxxxxxxxxxxxx' );

Where “xxxxxxxxxxxxxxxxxxxxxxx” means a unique key which will be generated automatically for you.

Also if you upgraded from WordPress WPMU to 3.1 and you can get the same error “Warning! WordPress encrypts user cookies, but you must add the following lines…” warning telling you to add the lines to my wp-config.php file.
wordpress-hack

Solution:

There are 8 lines total that need to be included in the wp-config.php file on a multisite network consisting of both SALT and KEY codes.

There’s a KEY 4 line block AND a SALT 4 line block.

Having only ever seen the KEY version before in working with non-multisite WP, I did not notice a difference.

But after looking in detail, I found that there are eight lines, not four. So Follow these steps.
Cause: WordPress is not saving the salt keys.

Fix:

Method 1:

  1. Open wp-config.php file
  2. Find the lines for AUTH_KEY, SECURE_AUTH_KEY, LOGGED_IN_KEY, and NONCE_KEY and delete them.
  3. Save your wp-config.php file.
  4. Log back into the WordPress Dashboard and you should be given 8 new lines of keys.
  5. Copy the lines and paste them in your wp-config.php file.
  6. Save the file.
  7. Clear your cache and refresh.

You can generate these key from the following link https://api.wordpress.org/secret-key/1.1/

Leave a Reply

Your email address will not be published. Required fields are marked *

Sign Up for Our Newsletters

Get notified of the best deals on our WordPress themes.

You May Also Like