1

I'm relatively new to magento, i want to run the command

php -f shell/log.php clean

in my website root folder.

Can this command affect the performance of the website or delete tables that are crucial ?

2 Answers 2

3

No, This will not affect the performance of your site. This will just clean your log_customer and log_visitor tables.

4
  • Thank you for your answer. Is it normal that it is taking a long time(half and hour and still running ..) ?
    – mockingbid
    Commented Dec 21, 2015 at 11:00
  • with ssh command it should be done fast. you can check the both table size in phpmyadmin. if data is in size GB then it might take a time but not as long you mention. Commented Dec 21, 2015 at 11:06
  • Yes it's a little large but half an hour is a long time. It's okay if i stop the process manually ?
    – mockingbid
    Commented Dec 21, 2015 at 11:13
  • yes you can stop process. also you can manually truncate those tables from phpmyadmin. Commented Dec 21, 2015 at 11:15
3

Magento provided default functionality in admin side

System > Configuration > Advanced > System > Log Cleaning

You can configure your store to automatically clean up these logs.

OR

. Shell Utility log.php in the ../shell directory

The shell utility log.php can be run manually to clean on-the-fly.

Using the command line tool go to {{MAGENTO_ROOT}}/shell folder and run the following command

php -f log.php -- clean

By default this will clean the log tables saving log entries for the number of days specified in admin settings under “Log Cleaning”.

You can even specify the days for which you want to save log in the following way 1 php -f log.php -- clean -- days 10

If you are at the {{MAGENTO_ROOT}} you will be running view plain print

php -f shell/log.php -- clean -- days 10

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.