Clean Magento session folder

On a VPS hosting Magento 1.9 disk was getting full. On checking, found var/session folder taking too much disk space.

Disk usage was 34 GB.

This folder is used to store PHP session files. You can delete them.

I created a cronjob to delete the session files that are older.

Add following content

Set a cronjob to run everyday

Method 2 – Strong session in database

Edit file

Find

Replace with

Magento