Solved: Warning: SessionHandler::read(): in Magento 2

It is not new for the Magento developer to face an error or try out a new customized feature. However, experimenting with things in a live online store may cause the functional disorder.

To avoid this risk, developers tend to move a live Magento 2 website to a local server in order to try out new themes or a plugin and solve the major issue.

Have you tried to move your Magento 2 live store into a local server and faced any error that says:

Warning: SessionHandler::read():open failed: No such file or directory

The exception looks like shown in the below image:

exception

If yes, I got your back.

Here’s the solution to warning:SessionHandler::read(): in Magento 2 store that you can refer to:

Solution to Warning: SessionHandler::read(): in Magento 2

Replace the below code in the env.php file at app/etc

'session' =>
  array (
    'save' => 'files'
  ),

with the below code:

'session' =>
  array (
    'save' => 'db'
  ),

That’s it.

Feel free to share the solution with Magento Community via social media.

Thank You.

Table of Contents