wordpress Connection refused [tcp://127.0.0.1:6379] 1panel

wordpress Connection refused [tcp://127.0.0.1:6379] 1panel

本文解决的是1panel面板安装redis后并且wordpress安装了redis object cache插件,但是无法正常连接的问题

出现这个原因是因为配置出现了问题,因为1panel安装是容器的方式,不同于堡塔所以配置有所差别。

首先点击左侧数据库-redis-连接信息

20240130234453987-image

复制容器连接地址和密码(没设置密码则无需设置)

20240130234608859-image

依次点击网站-目录打开网站目录

20240130234734233-image

依次打开index文件夹,wp-config.php

/* Add any custom values between this line and the "stop editing" line. */

注视下另起一行添加如下代码:

// Redis Object Cache端口配置
define('WP_REDIS_HOST','redis');//你复制的
define('WP_REDIS_PORT', 6379);//你复制的
define('WP_REDIS_PASSWORD','你的redis密码');

如下图

20240130235104721-image

一定要配置在/* Add any custom values between this line and the "stop editing" line. */x下面才能生效

© 版权声明
THE END
喜欢就支持一下吧
点赞15 分享
评论 共1条

请登录后发表评论