admin管理员组文章数量:1122832
I have about 50 sites in my server. I have installed redis to be used for cache and trying to cinfigure redis object cache plugin. I have done all the configurations I have read. Without the WP_CACHE_KEY_SALT and WP_REDIS_DATABASE, all the domain links redirect to one website that has been cached. Here is an example of my wp-config.php
define('WP_REDIS_HOST', '127.0.0.1');
define('WP_REDIS_PORT', '6379');
define('WP_REDIS_PREFIX', 'uniqueprefix_');
//define('WP_REDIS_DATABASE', 1);
define( 'WP_CACHE_KEY_SALT', 'domainname.tld:' );
From the code above, I have tried using a different database, but I get an error. Tried using WP_CACHE_KEY_SALT still getting an error. All solutions from this link here have not worked.
Please help me figure out what I could be doing wrong. I am using hestia cp (nginx + apache2)
I have about 50 sites in my server. I have installed redis to be used for cache and trying to cinfigure redis object cache plugin. I have done all the configurations I have read. Without the WP_CACHE_KEY_SALT and WP_REDIS_DATABASE, all the domain links redirect to one website that has been cached. Here is an example of my wp-config.php
define('WP_REDIS_HOST', '127.0.0.1');
define('WP_REDIS_PORT', '6379');
define('WP_REDIS_PREFIX', 'uniqueprefix_');
//define('WP_REDIS_DATABASE', 1);
define( 'WP_CACHE_KEY_SALT', 'domainname.tld:' );
From the code above, I have tried using a different database, but I get an error. Tried using WP_CACHE_KEY_SALT still getting an error. All solutions from this link here have not worked.
Please help me figure out what I could be doing wrong. I am using hestia cp (nginx + apache2)
Share Improve this question asked Oct 22, 2023 at 13:27 Timothy MachTimothy Mach 113 bronze badges 3 |1 Answer
Reset to default 0I had the same issue lately and you need to configure WP_REDIS_PREFIX
in wp-config.php
define( 'WP_REDIS_PREFIX', 'your_unique_key_for_each_wp_instance_' );
for each WP site. This solved my case.
本文标签: pluginsHow to configure redis object cache for multiple sites in the same server without errors
版权声明:本文标题:plugins - How to configure redis object cache for multiple sites in the same server without errors 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736290264a1928476.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
sudo apt update sudo apt install redis-server sudo nano /etc/redis/redis.conf //here I bound my local ip address sudo apt install php-redis sudo service apache2 restart sudo service nginx restart
– Timothy Mach Commented Nov 6, 2023 at 9:33127.0.0.1
? If not then you won't be able to connect through loopback, change your binding to127.0.0.1
and then restart redis:sudo service redis* restart
– Hugo Commented Nov 6, 2023 at 22:41