Skip to content

Instantly share code, notes, and snippets.

@alexander-young
Created November 6, 2019 03:42
Show Gist options
  • Save alexander-young/689ab789781d474065f957c0bb2a87a8 to your computer and use it in GitHub Desktop.
Save alexander-young/689ab789781d474065f957c0bb2a87a8 to your computer and use it in GitHub Desktop.
Install Redis for WordPress

Installing Redis

  • sudo apt update
  • sudo apt install redis-server
  • sudo nano /etc/redis/redis.conf
  • supervised systemd
  • maxmemory 128M
  • maxmemory-policy allkeys-lfu
  • sudo systemctl restart redis.service
  • sudo systemctl status redis
  • redis-cli and ping

Installing PHP Redis

  • wget https://github.com/nicolasff/phpredis/archive/master.zip
  • apt install unzip
  • sudo apt install php-dev
  • cd phpredis-master
  • phpize
  • ./configure
  • make
  • sudo make install
  • sudo echo "extension=redis.so" > /etc/php/7.x/apache2/conf.d/redis.ini create a redis.ini
  • sudo service redis-server restart
  • apache2ctl restart
@tuhinadri
Copy link

tuhinadri commented Nov 20, 2020

Hi, Alexander, could you please recheck the PHP-Redis link once more.. I think it's dead and the new link is here: https://github.com/phpredis/phpredis/archive/develop.zip
could you please recode PHP-redis for me. Thanks!

@wbarnard81
Copy link

wbarnard81 commented Jul 29, 2021

Hi, Alexander, could you please recheck the PHP-Redis link once more.. I think it's dead and the new link is here: https://github.com/phpredis/phpredis/archive/develop.zip
could you please recode PHP-redis for me. Thanks!

Should be https://github.com/phpredis/phpredis/archive/refs/heads/develop.zip now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment