WordPress成功接入redis高效缓存器 网站访问速度再提升!
PHP中安装redis
docker exec php pecl install redis && docker exec php sh -c 'echo "extension=redis.so" > /usr/local/etc/php/conf.d/docker-php-ext-redis.ini'
配置WordPress的wp-config.php,追加redis参数
define('WP_REDIS_HOST', 'redis');
define('WP_REDIS_PORT', '6379');
用docker-compose安装redis
https://github.com/kejilion/docker/blob/main/LNMP-docker-compose-3.yml
到wp后台安装redis插件
WordPress接入redis
回复删除1、PHP中安装redis
2、docker-compose安装redis
都要安装?还是二选一?
https://kejilion.blogspot.com/2023/07/wordpressredis.html