You can use the same Redis Server for all 5 sites, just use a different database for each site define( 'WP_REDIS_DATABASE', 0);
, use 0-16.
Thanks for the information
I have added the config but the plugin page is showing database 0. However I can see the changes made to MAXTTL in the same wp-config.php. What should I do now?
When I run redis-cli INFO keyspace
I see only db0 but not the other database (db1 which I added the config in site2)
After adding define( 'WP_REDIS_DATABASE', 1);
I cleared the cache using flushall
and restarted redis and php. But still the plugin page is showing the database as 0. Sometimes it redirects to the site1 which has redis db0.
-
This reply was modified 1 month, 1 week ago by
ironhead3.
Try flushing your PHP Opcode cache?
I tried clearing the Opcode cache but no luck. Here’s the configuration for second site (site2) on the same server:
I have added define( 'WP_REDIS_DATABASE', 1 );
to this site since site1 has Database 0. But the plugin in site2 is connecting to the Database 0 (https://i.imgur.com/73yfyxn.jpeg). However if I go to metrics tab I see a different value (https://i.imgur.com/H8Motih.jpeg). Upon opening the object-cache.php
located at /var/www/site2.com/wp-content/object-cache.php
I see Database 0 (https://i.imgur.com/5Lkg2eX.jpeg)
The object-cache.php
of both site1 and site2 is having the same entry. Is this a bug or a configuration mistake from my side?
Are you declaring WP_REDIS_DATABASE
too far down in your wp-config.php
?