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
- Use our Magik database backup extension which will automatically backup your database
- Use phpmyadmin and take the entire dump on your system
- 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
- Clean your logs via Magento Admin Panel
- 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
- Log on to your Magento Admin Panel.
- Go to System => Configuration
- On the left under Advanced click on System
- You will see “Log Cleaning” option under system
- 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.
- Open the database in phpMyAdmin
- Click on the boxes for the following tables in the right frame
- Click the drop down box that says “with selected” by looking at the bottom of the page and then click empty.
- 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.