{"id":381514,"date":"2023-05-23T13:45:33","date_gmt":"2023-05-23T13:45:33","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=381514"},"modified":"2026-04-06T10:09:51","modified_gmt":"2026-04-06T10:09:51","slug":"how-to-use-redis-for-magento-2-session-management","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/how-to-use-redis-for-magento-2-session-management\/","title":{"rendered":"How to use Redis for Magento 2 session management"},"content":{"rendered":"\n<p>We&#8217;ll explore How to use Redis for Magento 2 session management to enhance your store&#8217;s performance by configuring high-speed, scalable session storage.<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"1080\" width=\"1920\" controls style=\"aspect-ratio: 1920 \/ 1080;width:100%; max-width:800px; height:auto;\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/redis-session-cache-vs-default-magento2.mp4\"><\/video><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Install Redis<\/strong><\/h3>\n\n\n\n<p>Make sure you have <a href=\"https:\/\/redis.io\/\">Redis<\/a> installed and running on your server or local environment. You can download Redis from the official website and follow the installation instructions for your operating system.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Configure Magento 2 to use Redis for session storage:<\/h3>\n\n\n\n<p>1. Log in to your Magento 2 server or access the Magento 2 codebase.<br>2. In the Magento 2 root directory, open the `<strong>app\/etc\/env.php` <\/strong>file.<br>3. Locate the `<strong>session<\/strong>` configuration section, which should look like this:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&#039;session&#039; =&gt; &#091;\n    &#039;save&#039; =&gt; &#039;files&#039;,\n    &#039;save_path&#039; =&gt; &#039;path\/to\/session\/files&#039;,\n]<\/pre>\n\n\n\n<p>4. Replace the &#8216;<strong>save<\/strong>&#8216; value with &#8216;<strong>redis<\/strong>&#8216; and add a &#8216;<strong>redis<\/strong>&#8216; key to the &#8216;<strong>session<\/strong>&#8216; array with the Redis server configuration:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&#039;session&#039; =&gt; &#091;\n    &#039;save&#039; =&gt; &#039;redis&#039;,\n    &#039;redis&#039; =&gt; &#091;\n        &#039;host&#039; =&gt; &#039;127.0.0.1&#039;,\n        &#039;database&#039; =&gt; &#039;2&#039;,\n        &#039;log_level&#039; =&gt; &#039;4&#039;,\n        &#039;port&#039; =&gt; &#039;6379&#039;,\n        &#039;password&#039; =&gt; &#039;&#039;,\n        &#039;timeout&#039; =&gt; &#039;2.5&#039;,\n        &#039;persistent_identifier&#039; =&gt; &#039;&#039;,\n        &#039;compression_threshold&#039; =&gt; &#039;2048&#039;,\n        &#039;compression_library&#039; =&gt; &#039;gzip&#039;,\n        &#039;max_concurrency&#039; =&gt; &#039;6&#039;,\n        &#039;break_after_frontend&#039; =&gt; &#039;5&#039;,\n        &#039;break_after_adminhtml&#039; =&gt; &#039;30&#039;,\n        &#039;first_lifetime&#039; =&gt; &#039;600&#039;,\n        &#039;bot_first_lifetime&#039; =&gt; &#039;60&#039;,\n        &#039;bot_lifetime&#039; =&gt; &#039;7200&#039;,\n        &#039;disable_locking&#039; =&gt; &#039;0&#039;,\n        &#039;min_lifetime&#039; =&gt; &#039;60&#039;,\n        &#039;max_lifetime&#039; =&gt; &#039;2592000&#039;,\n        &#039;sentinel_master&#039; =&gt; &#039;&#039;,\n        &#039;sentinel_servers&#039; =&gt; &#039;&#039;,\n        &#039;sentinel_connect_retries&#039; =&gt; &#039;5&#039;,\n        &#039;sentinel_verify_master&#039; =&gt; &#039;0&#039;\n    ]\n]<\/pre>\n\n\n\n<p>5. Save the changes to the `<strong>env.php<\/strong>` file.<br>Clear Magento <strong>cache: Clear<\/strong> the Magento cache to ensure the new session configuration takes effect. You can do this by running the following command from the Magento root directory:<br>php bin\/magento cache: clean<br><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Test session management with Postman:<\/h3>\n\n\n\n<p>1. Open Postman or any REST API testing tool.<br>2. Set the HTTP method to POST.<br>3. Set the URL to your Magento 2 base URL followed by <code><strong>\/rest\/V1\/integration\/admin\/token<\/strong> (e.g., <\/code>`<strong>http:\/\/yourmagento2domain.com\/rest\/V1\/integration\/admin\/token<\/strong><code>).<br>4. In the request body, select <\/code>`<strong>form-data<\/strong>` and add the following key-value pairs:<\/p>\n\n\n\n<p>`<strong>username<\/strong>`: Your Magento 2 admin username<br>`<strong>password<\/strong>`: Your Magento 2 admin password<br>5. Click the &#8220;Send&#8221; button to send the request. This will return an access token.<br>6. Copy the access token from the response.<br>7. Set the HTTP method to GET.<br>8. Set the URL to your Magento 2 base URL followed by \/rest\/V1\/store\/storeViews.<br>9. Add a header with the following key-value pair:<\/p>\n\n\n\n<p>  `<strong>Authorization<\/strong>`<code>: Bearer [access_token]<br> Replace <\/code><strong>`[access_token]<\/strong>` with the access token you obtained in the previous step.<br>10. Click the &#8220;Send&#8221; button to send the request. This will retrieve the store views information.<\/p>\n\n\n\n<p><strong>Redis monitor command<\/strong> <\/p>\n\n\n\n<p>If you use Redis for session storage, you&#8217;ll see output similar to the following when monitoring:<br><\/p>\n\n\n\n<p>redis-cli monitor<\/p>\n\n\n\n<p><strong>Session storage verification<\/strong><\/p>\n\n\n\n<p>redis-cli monitor<br>redis-cli monitor<strong><br><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"313\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/image-42-1200x313.png\" alt=\"redis-cli monitor\" class=\"wp-image-381538\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/image-42-1200x313.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/image-42-300x78.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/image-42-250x65.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/image-42-768x200.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/image-42.png 1313w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"279\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/image-59-1200x279.png\" alt=\"redis-cli monitor\" class=\"wp-image-383178\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/image-59-1200x279.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/image-59-300x70.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/image-59-250x58.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/image-59-768x179.png 768w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/image-59.png 1250w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p><strong>Redis ping command<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">redis-cli ping<\/pre>\n\n\n\n<p><strong>PONG<\/strong> should be the response.<\/p>\n\n\n\n<p><strong>Redis Cluster Configuration<\/strong><\/p>\n\n\n\n<p>For enterprise-level deployments, Redis clustering provides improved performance and high availability:<br><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">&#039;session&#039; =&gt; &#091;\n    &#039;save&#039; =&gt; &#039;redis&#039;,\n    &#039;redis&#039; =&gt; &#091;\n        &#039;cluster&#039; =&gt; &#091;\n            &#039;seeds&#039; =&gt; &#091;\n                &#039;127.0.0.1:7000&#039;,\n                &#039;127.0.0.1:7001&#039;,\n                &#039;127.0.0.1:7002&#039;\n            ],\n            &#039;read_timeout&#039; =&gt; &#039;5&#039;,\n            &#039;connect_timeout&#039; =&gt; &#039;5&#039;\n        ],\n        \/\/ Additional configuration options\n        &#039;database&#039; =&gt; &#039;2&#039;,\n        &#039;compression_threshold&#039; =&gt; &#039;2048&#039;,\n        &#039;compression_library&#039; =&gt; &#039;gzip&#039;,\n        \/\/ ... other options\n    ]\n]<\/pre>\n\n\n\n<p>More information<br>redis-cli <a href=\"https:\/\/redis.io\/docs\/manual\/cli\/\" target=\"_blank\" rel=\"noreferrer noopener\">command reference<\/a><\/p>\n\n\n\n<p>That&#8217;s it! You have now configured Redis for session management in Magento 2 and tested it using Postman. You can continue exploring other <a href=\"https:\/\/webkul.com\/blog\/magento2-custom-rest-api\/\">Magento 2 REST APIs<\/a> using the access token and appropriate endpoints.<\/p>\n\n\n\n<p>We hope it will help you. Thank you!!<\/p>\n\n\n\n<p>If any issue or doubt please feel free to mention in comment section.<\/p>\n\n\n\n<p>We would be happy to help. Happy Coding!! \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We&#8217;ll explore How to use Redis for Magento 2 session management to enhance your store&#8217;s performance by configuring high-speed, scalable session storage. Install Redis Make sure you have Redis installed and running on your server or local environment. You can download Redis from the official website and follow the installation instructions for your operating system. <a href=\"https:\/\/webkul.com\/blog\/how-to-use-redis-for-magento-2-session-management\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":372,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,9121],"tags":[1317,2460,2070,1316,1869,14251,590],"class_list":["post-381514","post","type-post","status-publish","format-standard","hentry","category-magento","category-magento-2","tag-cache","tag-magento-2","tag-magento2","tag-redis","tag-session","tag-session-storange","tag-webkul"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to use Redis for Magento 2 session management<\/title>\n<meta name=\"description\" content=\"How to use Redis for Magento 2 session management, store session in redis , magento 2 redis session step-by-step guide on how to set it up\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/how-to-use-redis-for-magento-2-session-management\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to use Redis for Magento 2 session management\" \/>\n<meta property=\"og:description\" content=\"How to use Redis for Magento 2 session management, store session in redis , magento 2 redis session step-by-step guide on how to set it up\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/how-to-use-redis-for-magento-2-session-management\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-05-23T13:45:33+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-06T10:09:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/05\/image-42-1200x313.png\" \/>\n<meta name=\"author\" content=\"Sushil Kumar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sushil Kumar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-use-redis-for-magento-2-session-management\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-use-redis-for-magento-2-session-management\/\"},\"author\":{\"name\":\"Sushil Kumar\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/513087aa54cb0448c572658ecfcad038\"},\"headline\":\"How to use Redis for Magento 2 session management\",\"datePublished\":\"2023-05-23T13:45:33+00:00\",\"dateModified\":\"2026-04-06T10:09:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-use-redis-for-magento-2-session-management\/\"},\"wordCount\":411,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-use-redis-for-magento-2-session-management\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/05\/image-42-1200x313.png\",\"keywords\":[\"cache\",\"Magento 2\",\"Magento2\",\"redis\",\"session\",\"session storange\",\"webkul\"],\"articleSection\":[\"magento\",\"Magento 2\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-use-redis-for-magento-2-session-management\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-use-redis-for-magento-2-session-management\/\",\"url\":\"https:\/\/webkul.com\/blog\/how-to-use-redis-for-magento-2-session-management\/\",\"name\":\"How to use Redis for Magento 2 session management\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-use-redis-for-magento-2-session-management\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-use-redis-for-magento-2-session-management\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/05\/image-42-1200x313.png\",\"datePublished\":\"2023-05-23T13:45:33+00:00\",\"dateModified\":\"2026-04-06T10:09:51+00:00\",\"description\":\"How to use Redis for Magento 2 session management, store session in redis , magento 2 redis session step-by-step guide on how to set it up\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-use-redis-for-magento-2-session-management\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-use-redis-for-magento-2-session-management\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-use-redis-for-magento-2-session-management\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/image-42.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/image-42.png\",\"width\":1313,\"height\":342,\"caption\":\"image-42\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-use-redis-for-magento-2-session-management\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to use Redis for Magento 2 session management\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/513087aa54cb0448c572658ecfcad038\",\"name\":\"Sushil Kumar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c74cd7e0ce5fab0c3fa41d3e51de621a5492bea06afc4b577f10416abddf1ed3?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/c74cd7e0ce5fab0c3fa41d3e51de621a5492bea06afc4b577f10416abddf1ed3?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Sushil Kumar\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/sushil-kumar419\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to use Redis for Magento 2 session management","description":"How to use Redis for Magento 2 session management, store session in redis , magento 2 redis session step-by-step guide on how to set it up","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webkul.com\/blog\/how-to-use-redis-for-magento-2-session-management\/","og_locale":"en_US","og_type":"article","og_title":"How to use Redis for Magento 2 session management","og_description":"How to use Redis for Magento 2 session management, store session in redis , magento 2 redis session step-by-step guide on how to set it up","og_url":"https:\/\/webkul.com\/blog\/how-to-use-redis-for-magento-2-session-management\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2023-05-23T13:45:33+00:00","article_modified_time":"2026-04-06T10:09:51+00:00","og_image":[{"url":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/05\/image-42-1200x313.png","type":"","width":"","height":""}],"author":"Sushil Kumar","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Sushil Kumar","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/how-to-use-redis-for-magento-2-session-management\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/how-to-use-redis-for-magento-2-session-management\/"},"author":{"name":"Sushil Kumar","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/513087aa54cb0448c572658ecfcad038"},"headline":"How to use Redis for Magento 2 session management","datePublished":"2023-05-23T13:45:33+00:00","dateModified":"2026-04-06T10:09:51+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/how-to-use-redis-for-magento-2-session-management\/"},"wordCount":411,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/how-to-use-redis-for-magento-2-session-management\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/05\/image-42-1200x313.png","keywords":["cache","Magento 2","Magento2","redis","session","session storange","webkul"],"articleSection":["magento","Magento 2"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/how-to-use-redis-for-magento-2-session-management\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/how-to-use-redis-for-magento-2-session-management\/","url":"https:\/\/webkul.com\/blog\/how-to-use-redis-for-magento-2-session-management\/","name":"How to use Redis for Magento 2 session management","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/how-to-use-redis-for-magento-2-session-management\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/how-to-use-redis-for-magento-2-session-management\/#primaryimage"},"thumbnailUrl":"https:\/\/webkul.com\/blog\/wp-content\/uploads\/2023\/05\/image-42-1200x313.png","datePublished":"2023-05-23T13:45:33+00:00","dateModified":"2026-04-06T10:09:51+00:00","description":"How to use Redis for Magento 2 session management, store session in redis , magento 2 redis session step-by-step guide on how to set it up","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/how-to-use-redis-for-magento-2-session-management\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/how-to-use-redis-for-magento-2-session-management\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/how-to-use-redis-for-magento-2-session-management\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/image-42.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/05\/image-42.png","width":1313,"height":342,"caption":"image-42"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/how-to-use-redis-for-magento-2-session-management\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to use Redis for Magento 2 session management"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/513087aa54cb0448c572658ecfcad038","name":"Sushil Kumar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c74cd7e0ce5fab0c3fa41d3e51de621a5492bea06afc4b577f10416abddf1ed3?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c74cd7e0ce5fab0c3fa41d3e51de621a5492bea06afc4b577f10416abddf1ed3?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Sushil Kumar"},"url":"https:\/\/webkul.com\/blog\/author\/sushil-kumar419\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/381514","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/372"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=381514"}],"version-history":[{"count":27,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/381514\/revisions"}],"predecessor-version":[{"id":534259,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/381514\/revisions\/534259"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=381514"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=381514"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=381514"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}