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!

Jump to [hide]
spot_img

Related Articles

Why Custom Software Development Drives Business Success

Companies desire software solutions that are specifically designed to their specific processes and objectives in today's high-speed virtual world.  While...
Read More
We started WPArena back in 2008 and we had one main goal: teaching people how to be successful with WordPress....
Imagine walking into a library where books are scattered everywhere with no rhyme or reason. Frustrating, right? The same goes...