WordPress添加redis加速

1.编辑docker-compose.yml文件,使用docker-compose up -d 命令部署redis容器

version: '3.0'

services:
  redis:
    image: redis:alpine
    container_name: wordpress-redis
    restart: unless-stopped
    volumes:
      - ./redis-data:/data
    networks:
      - persist

networks:
  persist:
    external:
      name: daoker_net

2.在WordPress所在的容器中执行下列命令行,安装redis

pecl install redis
echo "extension=redis.so" > /usr/local/etc/php/conf.d/docker-php-ext-redis.ini

3.修改wp-config.php文件,在其中添加如下代码

define('WP_REDIS_HOST', 'wordpress-redis');
define('WP_REDIS_PORT', '6379');

4.安装redis插件

评论

  1. Windows Edge 108.0.1462.46
    4 周前
    2025-3-05 5:27:59

    I don’t think the title of your article matches the content lol. Just kidding, mainly because I had some doubts after reading the article.

  2. Windows Edge 108.0.1462.46
    1 月前
    2025-2-25 18:32:46

    Your point of view caught my eye and was very interesting. Thanks. I have a question for you.

  3. Windows Edge 108.0.1462.46
    1 月前
    2025-2-24 23:26:39

    I don’t think the title of your article matches the content lol. Just kidding, mainly because I had some doubts after reading the article.

  4. Windows Edge 108.0.1462.46
    1 月前
    2025-2-24 8:04:23

    Your article helped me a lot, is there any more related content? Thanks!

  5. 1 月前
    2025-2-22 2:09:40

    4ALGhdDbHpF

  6. TheSafeInternetSearch
    1 月前
    2025-2-22 2:03:56

    7LLyazAW4Bj

  7. TheSafeInternetSearch
    1 月前
    2025-2-22 1:58:12

    usWBL6Gd2Am

  8. TheSafeInternetSearch
    1 月前
    2025-2-22 1:52:34

    kn37wynLyhL

  9. TheSafeInternetSearch
    1 月前
    2025-2-22 1:46:55

    Dvvl8fUrqVm

  10. TheSafeInternetSearch
    1 月前
    2025-2-22 1:41:15

    O4oqmrpPOss

  11. TheSafeInternetSearch
    1 月前
    2025-2-22 1:35:35

    wAvjeAuCbqL

  12. TheSafeInternetSearch
    1 月前
    2025-2-22 1:29:51

    PnI52fShDIl

  13. TheSafeInternetSearch
    1 月前
    2025-2-22 1:24:14

    QuNK2AcHSgi

  14. TheSafeInternetSearch
    1 月前
    2025-2-22 1:12:48

    OK16mxA301a

  15. TheSafeInternetSearch
    1 月前
    2025-2-22 1:07:05

    R5ieMWjWFjq

  16. TheSafeInternetSearch
    1 月前
    2025-2-22 1:01:23

    lIxrm0RzUV0

  17. TheSafeInternetSearch
    1 月前
    2025-2-22 0:55:39

    9LByZ0aL3Tv

  18. TheSafeInternetSearch
    1 月前
    2025-2-22 0:50:01

    zUWrKL2Ejjb

  19. 1 月前
    2025-2-22 0:44:22

    9ljTebRWZ1U

  20. TheSafeInternetSearch
    1 月前
    2025-2-22 0:38:42

    IstFKf1eUE3

  21. TheSafeInternetSearch
    1 月前
    2025-2-22 0:33:00

    IePmMkV8fDo

  22. TheSafeInternetSearch
    1 月前
    2025-2-22 0:27:17

    od0XuiLb0t3

  23. TheSafeInternetSearch
    1 月前
    2025-2-22 0:21:38

    z8ttuPJ4wL3

  24. TheSafeInternetSearch
    1 月前
    2025-2-22 0:15:54

    8yZYtwjhJ2m

  25. TheSafeInternetSearch
    1 月前
    2025-2-22 0:10:11

    Kt0PlI51ju4

  26. TheSafeInternetSearch
    1 月前
    2025-2-22 0:04:28

    grcN8Y9wBVL

  27. TheSafeInternetSearch
    1 月前
    2025-2-21 23:58:45

    7d10KE3ROpN

  28. TheSafeInternetSearch
    1 月前
    2025-2-21 23:53:06

    ZCLLYO7BTo7

  29. TheSafeInternetSearch
    1 月前
    2025-2-21 23:47:24

    92BaCjIHwaW

  30. TheSafeInternetSearch
    1 月前
    2025-2-21 23:41:44

    2lsXLStaEsA

  31. TheSafeInternetSearch
    1 月前
    2025-2-21 23:36:02

    2RIkUDAvvch

  32. TheSafeInternetSearch
    1 月前
    2025-2-21 23:30:15

    yvIq4uZ4HjA

  33. TheSafeInternetSearch
    1 月前
    2025-2-21 23:24:32

    7WChoPJ8GrY

  34. TheSafeInternetSearch
    1 月前
    2025-2-21 23:18:50

    OWdiNce1J7Z

  35. TheSafeInternetSearch
    1 月前
    2025-2-21 23:13:08

    wv6dh57JVV6

  36. TheSafeInternetSearch
    1 月前
    2025-2-21 23:07:26

    lleTrerbftg

  37. TheSafeInternetSearch
    1 月前
    2025-2-21 22:55:12

    OBA2tPdI3XN

  38. TheSafeInternetSearch
    1 月前
    2025-2-21 1:40:19

    frxtjmxPRwo

  39. Windows Chrome 109.0.0.0
    1 年前
    2023-10-12 6:27:01

    你好,看完你的博客文章,感觉很不错!希望与你网站首页友情链接
    流量卡知识网
    http://53go.cn/
    专注于移动/联通/电信推出的大流量多语音活动长短期套餐手机卡的相关知识的介绍普及
    听说互换友情链接可以增加网站的收录量,特此来换,如果同意的话就给internetyewu@163.com[微信ganenboy]发信息或者就在此回复下吧!【建站问题也可以一起讨论!】

发送评论 编辑评论


|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇