More than 800+ satisfied clients and counting, since 2010


How to clean log details in Magento?

Magento is highly stable eCommerce system but it’s database is not very efficient. Every eCommerce store needs a sizable database to products and services online. But if certain precautions are not taken on time then magento Database could go extremely large as most of the low performance of the website is due to the data which is not used but stored in database. Clearing these logs not only leads to some dramatic speed improvements but also saves disk space. This also helps in reducing latency of query execution and hence improves performance. It is recommended to save your database backup before doing anything . This article deals with how to clean log details in Magento. You can do any of the following things to take backup of your current Magento store

  1. Use our Magik database backup extension  which will automatically backup your database
  2. Use phpmyadmin and take the entire dump on your system
  3. Use Magento’s built in profilers to export entire database.

 In Magento commerce open source community edition and even in enterprise edition there are several tables which captures logs of specific events like product comparisons, customer accesses and some other eventual logs. There is a self cleansing mechanism pre-built in Magento which cleans all the logs periodically but this important feature gets disabled by default as most of the store owners don’t even know about this feature and they never turn it ‘ON’. A busy store will therefore pile up huge sum of records in Magento store’s database which eventually slows the Magento store down, since the cleansing mechanism is turned OFF. There are two different options to clean up your logs

  1. Clean your logs via Magento Admin Panel
  2. Clean up your database tables directly via phpmyadmin or SSH MySQL

Cleaning Logs via Magento Admin Panel

This method is easier for non technical store owners who don’t want’ to mess directly with the Magento store’s database. Do the following to activate log cleaning option in Magento

  1. Log on to your Magento Admin Panel.
  2. Go to System => Configuration
  3. On the left under Advanced click on System
  4. You will see “Log Cleaning” option under system
  5. Fill the desired “Log Cleaning” option values and click Save.

Cleaning Logs via phpMyAdmin

This method is quicker and efficient than default Magento Log Cleaning tool if you are comfortable with mysql and queries. This method also allows you to clean whatever you want for example, you can even clean tables which aren’t included in default Magento’s Log Cleaning tool.

  1. Open the database in phpMyAdmin
  2. Click on the boxes for the following tables in the right frame
  3.  Click the drop down box that says “with selected” by looking at the bottom of the page and then click empty.
  4. Click the Yes button on the confirmation screen, and this will delete all the selected tables.

You should keep in mind that you are here to empty or truncate selected tables and not drop them. You should remain very careful while doing this. Performing this regularly will definitely improve your Magento store’s efficiency and performance.

Written by

The author didnt add any Information to his profile yet