Demac Media Demac Media Brand Demac Media Brand



Easy Steps for Magento Site Holiday Prep and Clean-Up

Timer Icon 7 Mins

Magento Commerce

With the holidays approaching quickly many merchants selling online are starting the multitude of tasks that they need to accomplish to be fully prepared for the busy season. Stress is high, as merchants have an opportunity to make 20% – 40% of their yearly sales. People are busy hiring any extra help that they might need, training new staff and retraining existing staff, preparing warehouses for the higher volumes of orders, planning sales, and more.

For retailers selling on Magento’s open source eCommerce platform it is of the upmost importance to ensure that your website is going to be able to handle the extra load that it’s going to have to face with the increase of users buying online to make the most of the sales. Having worked with eCommerce websites through a number of holiday seasons I have seen the good and bad of the holiday season, and I hope that by sharing some of my Magento experiences with you you’ll avoid the issues that plague most retailers this time of year. There is no one thing that will give you a major improvement to site performance. Don’t be too advantageous, your overall goal should be to improve performance just a little bit. Remember, the more people who are hitting your site, the more noticeable these changes will become. Keep in mind these east steps for Magento site holiday prep and clean-up.

Related: Managing Promotional Content for a Holiday Sale with Magento

The Biggest Mistake that Retailers Make Around the Holidays

magento holiday site prep

The biggest mistake that I see merchants make year-after-year is underestimating how much time it will take to prepare for the holidays. Start early!! This should be more than evident if you’re a subscriber to our blog, all of our holiday prep post have started to go up in July. Start the strategy and execution planning for your holiday promotions before the rush of traffic hit your site. This has a lot to do with the way promotions work on Magento’s platform. There are a number of backend processes that run in Magento when promotions fire, and if your eCommerce store is under a heavy load caused by holiday traffic it can negatively impact that usability of your site, wrecking havoc for your operations team, developers, and more importantly your customers.

Setup your holiday promotions before the holiday traffic arrives. When you save a promotion, Magento has a number of back end processes that run, and when the website is under holiday load this can have a negative impact on the usability of the site. Map out your promotions well in advance, and pay particular attention to your start and end dates as you’ll need to work around those. Your marketing surrounded your holiday promotions will also need to be planned out now too. Whether it’s a newsletter update or sales email – use the functionalities within your email marketing provider to set up dates in advance to schedule all your blasts. Remember the less you have to do this holiday season the easier it will be for you to handle the inevitable curveballs.

Related: Holiday Code Freeze 101

Optimizing Your Database

optimize your database

Magento stores a lot of logs in the database – 10 tables worth – that are seldom used. These logs can take up a lot of space and that’s no-good. Cleaning up your logs can save overhead on database calls, and speed up the overall performance of the site. Magento even comes with 2 different tools to do this job, one from the admin panel, and one from the command line.

Clean Your Logs From the Command Line

If you are comfortable with the command line, this is the quickest place to get the job done. That said, command line lacks many of the safety features that are in place on the admin panel, so only take this route if you are comfortable and know what you are doing.

From the root directory of the website, enter the following command:

php -f shell/log.php clean

It is that quick. There are other command line flags that you can use with this command to control how many days worth of logs you are saving. I recommend looking into these options to ensure that you are only cleaning what you don’t need.

Magento’s Log Cleaner

If you are not comfortable with the command line, Magento has included a tool that can be used from the command line. It is not as quick, but it is safer and easier to use.

  1. Once you log into the admin panel, in the top menu, go to System->Configuration
  2. In the left side menu of the configuration screen, under Advanced, choose System


  3. Under Log Cleaning set Enable Log Cleaning to YesMagento Log Cleaning
  4. This will tell Magento to clean the logs on a regular basis. You can adjust how much is saved and how often the logs are cleaned with the other configuration options.

After clearing the logs, I have seen databases that were originally more than 2 – 3 GB reduce their size by 50% or more. If you do this your hardware and your customers will thank you!

Clearing your Magento Log Files

log files

Always back-up first before doing this! Your Magento log files are in the var/log folder of your Magento install. These files log important system events and errors and are important to have. Clearing them out will make debugging any glitches that come up over the holidays that much easier and help you to minimize downtime over the holidays. Depending on size, this could be as easy as downloading a copy of the var/log folder onto your computer and deleting the one on the server. Don’t worry, if Magento tries to write to the log file and it doesn’t exist, it will create it for you.

What Else: Indexers and Cache

Once you have everything for the holidays planned, entered into the system, and you have cleaned up your logs, you are ready to weather the storm. At this stage, there are a number of things you can do to help ensure that the site stays running smoothly. Watch your indexers. Try not to run them if you don’t have to, and when you do, try to run them after hours.

The same can be said about cache. I have seen so many people make small changes to their sites in the middle of a holiday sale, and refresh or clear the cache to see the change show up. The problem is that caching is one of the mechanisms that Magento uses to keep the site fast and stable under load. In many cases, planning could have prevented the need for it, but sometimes surprises come up and you need to make changes to your site. Some things to keep in mind. Magento will eventually refresh the cache for that piece, if you can wait to see the change, you should wait. If you really need to see the change live to ensure that it worked, try the ?no_cache=1 option at the end of the URL. This will tell Magento that for this one request, do not load from cache. If you do need to clear the cache, you really should do it off of peak hours. I have seen too many websites go down from improperly clearing the cache.

Related: [Mini Tutorial] Increase Conversion with these Magento Checkout Layout Changes

Expect the Unexpected!

christmas shopping crowd
Overall, there is no magic bullet to ensure that the holidays will go smoothly. The unexpected will happen, and when traffic volume goes up, so do the problems. But with some early preparation, some basic cleaning, and being mindful of the amount of resources indexers and cache uses, it should help to at least reduce the load and downtime you experience. Good luck! To continue your personal and professional journey with Magento’s robust platform, download our free study guide to become a Magento Certified Solutions Specialist:

Download Study Guide

Subscribe to the Blog

Stay updated with 20,000+ eCommerce leaders in our community

Sign Up

Let’s talk about your 10X return

Icon/Social/Phone Contact us for pricing information