2.14.13.8 Configuring Redis in Magento

  1. Connect to hosting via SSH.
  2. Change to the directory where CMS Magento was installed by running the command:
    cd example.com/www/

    Instead example.com/www/ specify the path to the desired directory.

  3. Tune Redis possible for system caching and for page caching. Both types of caching can work in parallel if different database identifiers are specified for them. To configure the appropriate caching, run the desired 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 team instead of example indicate hosting account name, in which the site is located, and instead of X — specify the desired 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 team instead of example indicate hosting account name, in which the site is located, and instead of X — specify the desired Redis database identifier.

Warning!

The Redis database ID must be unique for all CMS and for different types of caching, in order to avoid errors with the intersection of data from different services.
Content