More than 1 wpredis site problem

To clarify, not multisite, but two separate sites on two separate domains on the same VPS.

At first, I had both sites installed with w3tc. Later on, I updated them with wpredis and content on both sites got mixed up. Even some of the backend settings got mixed up. IE: content from site1 appeared on site2 and vice-versa

If it makes any difference: both sites run on php7 with let’s encrypt on Ubuntu 16.04. All plugins and the VPS itself is constantly kept updated. Latest EE version too.

Hello THR, make sure each website use a unique “WP_CACHE_KEY_SALT” variable in wp-config.php, and purge the cache with the plugin redis object-cache available in the settings section

1 Like

Also, make sure the line that defines the “salt” is not below “stop editing” comment. If you create the site with --wpredis it will be correctly placed, but if you ee site update --wpredis it will be added beyond where it should be.

I usually define my “salts” just before the define('WP_DEBUG', false); line.

2 Likes

Both ‘salts’ were below the “don’t edit” line and the content got mixed up between the two sites again.

I flushed the cache and moved the salt lines to the top, but sadly, the content is mixed up and I’ll have to go over and redo both sites (settings) again.

I’ll leave it as-is for now and hope there won’t be any more mixups.


In the Nginx helper plugin, the settings for Redis (Hostname, Port, Prefix) are the same for both sites. Should they be the same?

The salts must be above the “do not edit” line.