3

In magento 1 I used to clear session deleting var/session dir.

But how to make it in Magento 2?

env.php fragment:

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

Any help will be much appreciated!

1

2 Answers 2

4

I've found solution myself.

I've changed my sessions to save to database like this:

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

And then I can clear session just truncationg the session table.

3

To get folder to clear, run the command: php -r "var_dump(ini_get('session.save_path'));" And then delete this folder.

1
  • It is where php stores session, but I am looking for magento sessions Commented Sep 21, 2017 at 6:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.