Multiple WordPress sites on single Redis server




Wordpress LScache Plugin: Multiple WordPress sites on single Redis server

Last Updated on: Wed, 15 Apr 2026 00:00:02
Hello, Im new to using Redis, Can I host multiple WordPress sites (60+) and use object caching (for the database) with Redis without problems? Im using Plesk with Litespeed EN. as I read I can achieve that in 2 ways either by using different Redis Database ID Or different cache key salt parameters on wp-config.php like this: define(WP_CACHE_KEY_SALT, sitewp1.com) define(WP_CACHE_KEY_SALT, sitewp2.com) define(WP_CACHE_KEY_SALT, sitewp3.com) Note: Also each site uses a different table prefix. The question is does the LSCache plugin use the parameter WP_CACHE_KEY_SALT or a different parameter? as the WP_CACHE_KEY_SALT used by the Redis Object Cache plugin, After I enabled the object cache from sitting with Redis it works fine but it didnt add the WP_CACHE_KEY_SALT to the wp-config.php or should I do that manually? Whats the right way to use Redis object cache with LSCache with multiple WordPress sites? I dont prefer using database ID for each site and I dont mind that all of the websites will use the same Redis database, I liked the way of using different cache key salt parameters and want to know the right way to do it with LSCache. The last thing is there are a few keys in the wp-cofing.php but none of them WP_CACHE_KEY_SALT : / Authentication Unique Keys and Salts. Change these to different unique phrases! You can generate these using the @link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again. @since 2.6.0 / This topic was modified 1 year, 4 months ago by Yui. Reason: wp-config.php SALTS removed This topic was modified 1 year, 4 months ago by Yui. Reason: formatting Authentication Unique Keys and Salts. those salts in wp-config.php are used as seeds for cookie and nonce generation (and are considered to be private data not to be exposed to public, i have removed them from your post) WP_CACHE_KEY_SALT this constant is not used within plugin code, and as i can quickly check, there are no site based salts used for redis or memcached cache. However, plugin support team can give a better compherensive answer to this question and they can add this to their TODO list for plugin. Hi, our plugin will add a random prefix to each site , e.g. 37a93post_meta.2583 and 9c63cpost_meta.48 the first 5 string is randomly prefix but I must pointed out , such action may result a security threat if you dont separate the Redis , one site could have access to all the data stored in Redis , that is not a good thing Best regards, @CacheCrawler ? Thank you so much for your helpful replay, I understand that its dangerous from the security side but my use case is different from normal, I will be using it in a Waas system and the clients will not have any type of access to the database or ssh, etc? they will only manage their WordPress dashboard its kind of fully managed WordPress. How I can check the prefix of each site? I cant find it in the wp-config.php https://github.com/litespeedtech/lscache_wp/blob/cf4951d18a347897b48fe13d3f777b9aafe8db77/src/object.lib.php#L191 its not from the wp-config.php , please check above Thanks for your patience with my questions I really appreciate that. Im not a developer I just want to know when this random prefix happens? Does it happen the first time I install the plugin? What if I clone a site that has the LSCache plugin preconfigured to a new domain will the prefix be the same? Or do I have to clone the site first without the LSCache plugin then install it on the new domain so it can generate a different prefix? well , I am not developer either here is a quick explanation to the above code it will create a prefix by using 5 first string out of a m5sum value of file path , and in combine this blog_id if its WP network and its virtually impossible to have 2 different WP sites on exact same file path on same server , and only case for that is network , which will attached with blog_id to differentiate them so as long as you dont spread your sites across different servers and use same file path for all of them , and they are all connect to same Redis server, then you will be fine , no need any additional things to do just make sure they are not in same file path Thank you so much, Now I get it I really appreciate your explanation.



LiteCache Rush: Speed comes from using less, not from doing it faster



Reference