I have 4.4 GB file in var/session
folder. The free space is very limited so is possible to delete that folder?
4 Answers
You can clear it safely, but your customers will be loggedout and their carts will be cleared.
If you have a space issue, other than clearing your var/session
path you could consider moving to database session handling.
If you like to move to DB session system:
Open app/etc/local.xml
:
Change:
<session_save>file</session_save>
To:
<session_save>db</session_save>
Alternatively you could run a command like this that will delete files within the session folder older than X Days
find var/session/* -mtime +X -exec rm {} \;
Change X to the number of days. Then the most recent sessions will be safe and customers currently checking out will be fine.
Be careful with the location so you do not delete something you don't want to and take backups before doing something like this
Yes you can delete the var/session folder. Once you delete the folders from the var/session folder your all customers who are currently logged in will be loggout and you as a admin also will logout
Basically all current sessions will logout.
go to root path of the site , than you can run this command from terminal rm -rf var/session/*
but if you do this , if any guest added items to cart will become empty. also you will log out from the backend. even customers have to login again in frontend.