nstall Redis
Update your package list
apt update
Install Redis server.
redis-server のインストール
apt install redis-server
インストールされたバージョンの表示
# redis-server -v
Redis server v=7.0.15 sha=00000000:0 malloc=jemalloc-5.3.0 bits=64 build=2f17c0d9eab7b91
Verify Redis status.
systemctl status redis-server
oot@litespeed:/usr/local/lsws/wordpress# systemctl status redis-server
● redis-server.service - Advanced key-value store
Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; preset: enabled)
Active: active (running) since Sun 2025-08-17 21:05:25 JST; 6min ago
Docs: http://redis.io/documentation,
man:redis-server(1)
Main PID: 28865 (redis-server)
Status: "Ready to accept connections"
Tasks: 5 (limit: 37515)
Memory: 4.0M
CPU: 602ms
CGroup: /system.slice/redis-server.service
└─28865 "/usr/bin/redis-server 127.0.0.1:6379"
Aug 17 21:05:25 litespeed systemd[1]: Starting redis-server.service - Advanced key-value store...
Aug 17 21:05:25 litespeed systemd[1]: Started redis-server.service - Advanced key-value store.
status redis-server はインストールするだけで動いているみたい。
redis-cli ping
→ PONG と返ればOK
# redis-cli ping
PONG
Install the Redis PHP Extension for LiteSpeed
LiteSpeed 用の Redis PHP 拡張機能をインストールする
LiteSpeed インストールで使用される PHP バージョンを確認します (例: lsphp81 )。 対応する PHP Redis 拡張機能をインストールします。 たとえば、PHP 8.1 の場合
php -v
PHP 8.4.11 (cli) (built: Aug 8 2025 00:13:23) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.4.11, Copyright (c) Zend Technologies
with Zend OPcache v8.4.11, Copyright (c), by Zend Technologies
PHP 8.4 のようだ。
apt install lsphp84-redis
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
lsphp84-redis is already the newest version (6.2.0-3+bookworm).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
テスト
redis と出ればOK
# php -m | grep redis
redis
OpenLiteSpeed の設定で Redis を有効にする
通常は OLS (OpenLiteSpedd) 側に特別な設定は不要です。
WordPress + LiteSpeed Cache プラグイン から Redis を利用する形になります。
Configure LiteSpeed Cache to use Redis
For WordPress with LiteSpeed Cache plugin
1. WordPress の管理画面にログイン
2. LiteSpeed Cache → Cache → Object に移動
3. 「Object Cache」を 有効化
4. 「Method」を Redis に設定
5. 「Host」を 127.0.0.1、「Port」を 6379 に設定(デフォルト)
6. 保存して「接続テスト」を確認する

リスタート
systemctl restart lsws
アパッチベンチで確認
Redis cache OFF
Redis cache ON
% ab -n 100 -c 100 https://litespeed.home/
Server Software: LiteSpeed
Server Hostname: litespeed.home
Server Port: 443
SSL/TLS Protocol: TLSv1.2,ECDHE-RSA-AES128-GCM-SHA256,2048,128
Server Temp Key: ECDH X25519 253 bits
TLS Server Name: litespeed.home
Document Path: /
Document Length: 80514 bytes
Concurrency Level: 100
Time taken for tests: 0.195 seconds
Complete requests: 100
Failed requests: 0
Total transferred: 8097700 bytes
HTML transferred: 8051400 bytes
Requests per second: 511.96 [#/sec] (mean)
Time per request: 195.328 [ms] (mean)
Time per request: 1.953 [ms] (mean, across all concurrent requests)
Transfer rate: 40485.29 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 7 105 20.8 91 132
Processing: 51 76 19.0 90 161
Waiting: 1 25 14.9 38 39
Total: 168 181 2.1 181 184
Percentage of the requests served within a certain time (ms)
50% 181
66% 182
75% 182
80% 183
90% 183
95% 184
98% 184
99% 184
100% 184 (longest request)
% ab -n 100 -c 100 https://litespeed.home/
Server Software: LiteSpeed
Server Hostname: litespeed.home
Server Port: 443
SSL/TLS Protocol: TLSv1.2,ECDHE-RSA-AES128-GCM-SHA256,2048,128
Server Temp Key: ECDH X25519 253 bits
TLS Server Name: litespeed.home
Document Path: /
Document Length: 80514 bytes
Concurrency Level: 100
Time taken for tests: 0.217 seconds
Complete requests: 100
Failed requests: 0
Total transferred: 8095400 bytes
HTML transferred: 8051400 bytes
Requests per second: 461.80 [#/sec] (mean)
Time per request: 216.545 [ms] (mean)
Time per request: 2.165 [ms] (mean, across all concurrent requests)
Transfer rate: 36508.18 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 35 95 21.4 77 119
Processing: 49 74 19.8 91 159
Waiting: 2 29 15.2 43 43
Total: 166 170 4.1 167 194
Percentage of the requests served within a certain time (ms)
50% 167
66% 172
75% 173
80% 174
90% 174
95% 175
98% 177
99% 194
100% 194 (longest request)
全体のパフォーマンスは、低下気味のようだ。
ちなみに、Lighthouse のMobile評価は、全くの同じだった。