Magento database is unusually huge – clean it now
If your Magento database is unusually huge, it might be time to clean it.
People usually notice that their database is very large in file size when it comes to backing up / exporting a copy of their database.
Most of the time the large file size comes from the logs and reports tables storing old or unnecessary data.
Firstly, turn on Log Cleaning in the Magento admin panel.
Do this by clicking on:
- ADVANCED (TAB)
- LOG CLEANING (TAB)
- Enable Log Cleaning = Switch to Yes
- Save Log, Days = 15 (or other desired number – default is 180)
Once you have done this, it is time to get rid of current logs by emptying the tables via mysql manager such as PHPMYADMIN.
To do this, follow this handy guide here that tells you which tables to TRUNCATE (empty).
A recent example of this cleaning was a database going from 110MB to 1.6MB after cleaning.
Note: Remember to always backup your data before making changes incase something doesn’t go as planned.