Skip to content

Magento 1.9 deleting session from Plesk panel

The var/session folder constantly stores a large amount of data, which causes a lot of innode utilisation on the server,

I cannot enter the session folder because it is too big.

So I would like to ask how I can automatically delete session files every 24 hours, via a plesk command.

I have entered the following command: find /var/www/vhosts/mydomain/httpdocs/var/session -type f -ctime +8 -ctime -28 -delete

However, the command does not work correctly despite the fact that I have all the permissions. I don’t want to use SSH or PHP but would like to solve this via cron jobs with a command on Plesk.

Thank you,