Magento Manual Cleanup

Magento creates lots of files and database entries no one really needs. So here is how I tried to clean up the mess – based on this script from the magento site http://www.magentocommerce.com/wiki/groups/227/maintenance_script

First I logged in into the shell and executed the following in the magento directory:

rm -rf var/cache/* var/log/* var/report/* var/session/* 
  var/tmp/* media/import/*

After that I executed the following SQL queries:

truncate table dataflow_batch_export;
truncate table dataflow_batch_import;
truncate table log_customer;
truncate table log_quote;
truncate table log_summary;
truncate table log_summary_type;
truncate table log_url;
truncate table log_url_info;
truncate table log_visitor;
truncate table log_visitor_info;
truncate table log_visitor_online;
truncate table report_event;

Leave a Comment