Solved – “Your session has expired” On Clicking Add To Cart In Magento 2.3 Localhost

Solved - “Your session has expired” On Clicking Add To Cart In Magento 2.3 Localhost

If you have been too much into Magento like me, you might have experienced an error that says “Your session has expired” on clicking add to cart in Magento 2.3 localhost.

This may happen when you have installed a fresh Magento 2.3 at local and trying test product functionality by adding to the cart.

To resolve the issue, try the below solution to get rid of the expired session error.

Solution For “Your Session Has Expired” On Clicking Add To Cart In Magento 2.3 Localhost:

Use 127.0.0.1 instead of localhost

http://127.0.0.1/mag233sample/ is localhost homepage URL

Run the command:

That’s it.

If you are still stuck with the same error after implementing the above solution, please mention your doubts in the Comments section below. I’d be glad to help you out.

Do share the solution with the fellow developers via social media!

Thanks.

5
(based on 4 Reviews)

Sanjay is a co-founder at Meetanshi. He is a Certified Magento Developer who loves creating Magento E-commerce solutions. When he is not engrossed with anything related to Magento, he loves to play cricket.

Leave a Reply