宝塔用户_bzachi 发表于 2024-3-29 16:46:09

【待反馈】为Redis设置密码后网站报错

为了能快速了解并处理您的问题,请提供以下基础信息:面板、插件版本:
系统版本:
问题描述:为Redis设置密码后网站报错
相关截图(日志、错误):
Error establishing a Redis connectionNOAUTH Authentication required.WordPress is unable to establish a connection to Redis. This means that the connection information in your wp-config.php file are incorrect, or that the Redis server is not reachable.
[*]Is the correct Redis host and port set?
[*]Is the Redis server running?
If you need help, please read the installation instructions.To disable Redis, delete the object-cache.php file in the /wp-content/ directory.

堡塔运维南一 发表于 2024-3-29 17:29:03

您好,这个报错是说WordPress在连接redis的时候有问题,可以尝试下面几个方向去排查一下:
1、更新wp-config.php:
在WordPress的根目录下的wp-config.php文件中,找到与Redis相关的配置行。确保你添加了正确的Redis主机、端口和密码,修改之后需要重启web才能生效,代码如下:
define('REDIS_HOST', 'localhost');
define('REDIS_PORT', 6379);
define('REDIS_AUTH', 'your_redis_password'); // 如果设置了密码,请添加此行并替换your_redis_password
define('REDIS_SCHEME', 'tcp');

2、防火墙和安全组:
确保你的服务器防火墙或云服务提供商的安全组设置允许从你的WordPress服务器到Redis服务器的连接。
页: [1]
查看完整版本: 【待反馈】为Redis设置密码后网站报错