wordpress Redis 多站共存

网上很多教程都在瞎几把扯犊子,腾讯开发者社区里更是给出了逆天教程让改wp数据库前缀,真牛逼。

再说Redis改数据库编号有什么用?

Redis 的多个数据库(编号 0-15)其实都在同一个实例里,你改这玩意儿有什么用?

默认只使用 db0 才是最佳实践。

只有两行的设置被这帮人说的如此离谱。

wp-config.php文件里修改就可以了。

代码:

define( 'WP_CACHE_KEY_SALT', '域名' );
define( 'WP_REDIS_PASSWORD', 'Redis密码' );

开启插件就完事了。

  • All rights reserved.
  • No part of this website, including text and images, may be reproduced, modified, distributed, or transmitted in any form or by any means, without the prior written permission of the author.
  • Unauthorized commercial use is strictly prohibited.
  • Unauthorized personal use is strictly prohibited.