How to configure Magento to use Redis

This article describes how to configure Magento 2 to use Redis.

Redis is an open-source memory object caching system that websites can use to help accelerate page load times. Redis works by caching in RAM frequently accessed data, such as the results of API calls, database calls, and more.

  • Redis is currently enabled on Managed VPS and Managed Dedicated server accounts.
  • If you have an unmanaged VPS or unmanaged Dedicated Server, you have full root access and can install and configure Redis yourself.
  • Redis is not supported on shared hosting accounts at this time.

Enabling Redis for Magento 2

To enable Redis for Magento 2, follow these steps:

  1. Log in to your account using SSH.
  2. At the command prompt, change to the directory where you installed Magento (for example, type cd ~/public_html).
  3. Type the following commands:
    bin/magento setup:config:set --cache-backend=redis
    bin/magento setup:config:set --page-cache=redis
    bin/magento setup:config:set --session-save=redis
    
    When you run the last command, you may be prompted to overwrite the existing configuration for session-save. If this occurs, type y and then press Enter.
  4. Redis is now enabled for Magento.

More Information

Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.

Usamos cookies con el fin de personalizar para usted nuestro sitio Web y analizar el uso de éste. Usted acepta esto haciendo clic en “Acepto” o al continuar usando el sitio Web. Hay más información sobre cookies en nuestra política de privacidad.