Skip to main content

Cron Job to auto clean Magento Session files to save inodes

Comments

3 comments

  • Infopro
    You might find this site of some use for this sort of question:
    0
  • Logesh K
    @Infopro Thanks for your reply. But since I am selling Shared Hosting on my servers, I won't be able to tuneup each Magento installation and I want to setup a Cron to delete the files. So can you please tell me how about my code? Will it work and safe ? 0 0 * * * find /tmp -name 'sess*' -mtime +1 -exec rm -v {} \;
    0
  • cPanelMichael
    Hello @Logesh K, Can you check if the /usr/local/cpanel/scripts/clean_user_php_sessions script is cleaning up the older session files? We document how to use this script on the link below: MultiPHP INI Editor for WHM documentation. Thank you.
    0

Please sign in to leave a comment.