- Jun 6, 2020
- 246
- 671
- 93
define( 'WP_REDIS_CONFIG', [
'token' => "...",
'host' => '127.0.0.1',
'port' => 6379,
'database' => 1,
'maxttl' => 3600 * 24,
'timeout' => 1.0,
'read_timeout' => 1.0,
'compression' => 'zstd',
'serializer' => 'igbinary',
'async_flush' => true,
'client' => 'phpredis',
'split_alloptions' => true,
'retry_interval' => 300,
'shared' => true,
'prefetch' => true,
'debug' => false,
'prefix' => DB_NAME,
'save_commands' => false,
'non_persistent_groups' => [
'litespeed',
],
]);
define( 'WP_REDIS_DISABLED', false );
This plugin is a little difficult to use. Because you need to have good knowledge of Linux. I am using a config like this and there are 9 sites on the same server. all working perfectly.
You need to make some adjustments to use redis on different sites on the same server. I marked these settings as "bold".
'token' => "...",
'host' => '127.0.0.1',
'port' => 6379,
'database' => 1,
'maxttl' => 3600 * 24,
'timeout' => 1.0,
'read_timeout' => 1.0,
'compression' => 'zstd',
'serializer' => 'igbinary',
'async_flush' => true,
'client' => 'phpredis',
'split_alloptions' => true,
'retry_interval' => 300,
'shared' => true,
'prefetch' => true,
'debug' => false,
'prefix' => DB_NAME,
'save_commands' => false,
'non_persistent_groups' => [
'litespeed',
],
]);
define( 'WP_REDIS_DISABLED', false );
This plugin is a little difficult to use. Because you need to have good knowledge of Linux. I am using a config like this and there are 9 sites on the same server. all working perfectly.
You need to make some adjustments to use redis on different sites on the same server. I marked these settings as "bold".