From 3daa7871f2f57bc5db2d1bd54ae8cc8c7fb5f6fc Mon Sep 17 00:00:00 2001 From: Marvin Sanders Date: Mon, 29 Dec 2025 15:42:47 +0100 Subject: [PATCH] Update Redis configuration instructions for Magento 2 documentation to include session save settings and correct Redis CLI command. --- .../magento-2/how-to-configure-redis-for-magento-2.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/ecommerce-applications/magento-2/how-to-configure-redis-for-magento-2.md b/docs/ecommerce-applications/magento-2/how-to-configure-redis-for-magento-2.md index 7ec896e3..9845690f 100644 --- a/docs/ecommerce-applications/magento-2/how-to-configure-redis-for-magento-2.md +++ b/docs/ecommerce-applications/magento-2/how-to-configure-redis-for-magento-2.md @@ -134,6 +134,7 @@ After enabling the second Redis instance you need to change the configured Redis ```console $ cd /data/web/magento2 $ bin/magento setup:config:set \ + --session-save=redis \ --session-save-redis-port=6378 \ --session-save-redis-db=0 ``` @@ -149,7 +150,7 @@ Furthermore you need to add the following line to your crontab: To verify whether your configuration is working properly, first clear your session store: ```console -$ rm /data/web/public/var/sessions/* +$ rm /data/web/magento2/var/sessions/* ``` Now open the site in your browser and hit `F5` a few times or log in to the admin panel. If all is well, no additional sessions files should be written to `/data/web/var/sessions`, but instead to the Redis database: @@ -157,7 +158,7 @@ Now open the site in your browser and hit `F5` a few times or log in to the admi To verify whether your configuration is working properly, first clear your session store: ```console -$ redis-cli -n 2 keys '*' +$ redis-cli -p 6378 keys '*' ``` ## Troubleshooting