Tutorials

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

Pinterest LinkedIn Tumblr

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/

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.

Write A Comment

Pin It