2.14.13.8. Configure Redis in Magento

Attention!

Redis database identifier must be unique for all CMS and for different types of caching in order to avoid errors caused by data overlap between different services.
  1. Connect to the hosting via SSH.
  2. Go to the site directory (use your own data in the command):
    cd example.com/www/
  3. You can configure Redis for system caching and for page caching. Both types of caching can run in parallel if different database identifiers are specified for them. To configure the corresponding caching, execute the required command:
    bin/magento setup:config:set --cache-backend=redis --cache-backend-redis-server=/home/example/.system/redis.sock --cache-backend-redis-db=X

    In the command, instead of example, specify the name of the hosting account where the site is hosted, and instead of X specify the required Redis database identifier.

    bin/magento setup:config:set --page-cache=redis --page-cache-redis-server=/home/example/.system/redis.sock --page-cache-redis-db=X

    In the command, instead of example, specify the name of the hosting account where the site is hosted, and instead of X specify the required Redis database identifier.

Content