How to Clear Logs and Reduce Database Size in Magento
It is important to regularly maintain your website’s database for better performance, especially using Magento. The application is one of the most powerful tools for setting up an online store. However, when it comes to the database on a Magento store, you may notice an increased size, without keeping that much of information in reality.
The issue causing the large database size on Magento websites is that it logs a lot of information, such as the visitors on your website, comparison of products, etc. This may be useful for some store owners, but others do not even know that the feature exists. There is a log cleaner in Magento that can easily resolve the issue with the database size, but it is disabled by default and most clients never know it even exists. This is resulting in large databases, slow performance and other issues that you may wish to avoid.
The solution is to clear your database from all data that you do not need on your website. In most cases, this will lower the size with more than 50%, which will also result in better performance.
The cleanup of your database is easy and you can complete it via the administrative area of your Magento website. Simply log into the admin dashboard and click on the System tab from the main menu and then Configuration.
Scroll down to the bottom of the page, locate the Advanced section on the left side and click on the System option. Expand the Log Cleaning section and edit the following details:
Save Log Days: You can leave set this to 10 days, or a lower number of your choice, to avoid issues with large database size.
Enable Log Cleaning: Set this option to Yes.
The rest of the options are not mandatory. You can review them and perform changes per your personal needs.
Click on the Save Confirm button above and the system will keep the changes for you. The logs of your website will now be kept for no longer than 10 days, which means that you will experience no issues with a large database size for your Magento website.
Keeping logs of different events on your website is a useful feature, but you need to monitor it carefully. It can cause a large size for your Magento database and slow the performance of your website. It is important to be completely aware of what is going on with your website so you can make sure that it is properly maintained. This will save you time, money and troubles in the future.
If you are still experiencing issues with your Magento website, we offer 24/7 technical support assistance for existing clients on our SSD Magento Hosting plans. You can always log into your Client Area and contact our techs for a complete review of your website.
The latest tips and news from the industry straight to your inbox!
Join 30,000+ subscribers for exclusive access to our monthly newsletter with insider cloud, hosting and WordPress tips!