在Lightsail上为WordPress引入Redis缓存

首先

Lightsail 上の WordPress に Redis Object Cache を導入する。

据说,如果引入了对象缓存,网站加载速度会变得更快。

环境

动作环境是以下的事实。

Linux ip-■■■-■■■-■■■ 4.19.0-17-cloud-amd64 #1 SMP Debian 4.19.194-3 (2021-07-18) x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
       ___ _ _                   _
      | _ |_) |_ _ _  __ _ _ __ (_)
      | _ \ |  _| ' \/ _` | '  \| |
      |___/_|\__|_|_|\__,_|_|_|_|_|

  *** Welcome to the Bitnami WordPress 5.6.1-1                     ***

步骤

導入 Redis 伺服器

从Lightsail实例页面中,点击终端图标,启动Webu终端。

20210725-211018-Lightsail.jpg

安装 Redis 服务器。

sudo apt update -y
sudo apt install redis-server -y

启动Redis服务器。

sudo systemctl start redis-server

引入Redis Object Cache插件。

在插件的新添加界面上选择Redis Object Cache。

20210725-210833-プラグインを追加 ‹ Space Software Portal — WordPress.jpg

点击左下方的【启用对象缓存】按钮。

20210725-210854-Redis Object Cache ‹ Space Software Portal — WordPress.jpg

确认”状态”已经变为”已连接”。

20210725-210921-Redis Object Cache ‹ Space Software Portal — WordPress.jpg

请参考下列网站。

bannerAds