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

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/

Disclosure: Some of the links in this article are affiliate links and we may earn a small commission if you make a purchase, which helps us to keep delivering quality content to you. Here is our disclosure policy.

Noor Mustafa Raza
Noor Mustafa Raza
I am a WordPress Developer and Designer, author @WPArena. I am providing Free WordPress consultation and can help you to install WordPress in a secure way to small businesses and bloggers.

LEAVE A REPLY

Please enter your comment!
Please enter your name here
Captcha verification failed!
CAPTCHA user score failed. Please contact us!

spot_img

Related Articles

Why WordPress Is The Best CMS? (And, Possible Alternatives)

Why WordPress is the best CMS? Having a website has become a necessity for both individuals and businesses. Content Management...
Read More
When optimizing the speed of your WordPress site, you might come across a performance metric known as Time to First...
Are you dealing with a broken WordPress site and don't know what to do? If your website is showing a...