Redis Multisite Installation
-
Hello,
I have a multisite installation. I installed the plugin, added the configurations in wp-config.php, and activated Redis on the server. Everything seems to be working in the network admin panel. But does this also work for subsites? I’m not sure.I’ve read some sources that a different configuration is required for subsites in a multisite Redis installation. For example, it seems that each subsite needs to have a table prefix defined in the wp-config.php file.
Is it like this?
$host = $_SERVER[‘HTTP_HOST’] ?? ‘cli’;
define(‘WP_CACHE_KEY_SALT’, md5($host) . ‘_’);Or is it like this?
define( ‘WP_REDIS_PREFIX’, ‘site_’ . $_SERVER[‘HTTP_HOST’] . ‘_’);These are the only configurations I’ve added for Redis in wp-config.php:
define(‘WP_REDIS_HOST’, ‘127.0.0.1’);
define(‘WP_REDIS_PORT’, 6379);
define(‘WP_REDIS_DATABASE’, 0);
define(‘WP_REDIS_PASSWORD’, ”);
The topic ‘Redis Multisite Installation’ is closed to new replies.