Make Magento faster without touching code

Published
/
Updated
/
From

Configuration is key to ensuring your Magento store loads quickly. Magento has a lot of built-in features to speed up rendering, but understanding all of the choices can be understandably intimidating.This guide will walk you through the steps required to get the most out of Magento’s optimization features.

Speed is important because it directly impacts both search rankings and conversion rates.

The gist of it is that people are impatient—no surprise there.

Before we talk about the configuration options you can use to improve Magento’s load time, let’s talk about some commonly offered solutions to Magento being slow.

Common Solution: Blame your hardware, blame your software

Many developers optimizing Magento diagnose either a hardware or software problem.

A hardware problem means you’ll need to move to another, beefier server. You’re potentially looking at an expensive site migration.

It’s true—Magento needs to be run on a relatively powerful server. Depending on the number of customers you serve at a time, you’ll need something between mid-tier and ludicrous speed. Maybe you do need a more capable server.

A software issue might mean that there’s some bad code—perhaps added by a rogue extension. If that’s the case then the only way to speed up your store is for a developer to get elbow-deep in code.

It’s possible that some code isn’t as performant as it could be. If there’s a big, identifiable bottleneck in your site’s code then by all means address it!

First things first: Checking configurations for speed

You might be able to put off making hardware and software changes. Your store might not be taking advantage of all Magento’s built-in features to optimize load time.

A decent portion of the Magento stores I’ve surveyed certainly don’t. The following is meant to be a comprehensive list of Magento’s built-in features to improve load times and information on how to configure them.

Configuring Magento for speed

As with any change to Magento, we recommend you make all changes on a development site first. Run thorough testing to ensure your store is working as expected. Then make changes on production. Suggestions are in order for most to least impactful.

1. Caches

Magento’s Caches are its most well known optimization option. They work by storing blocks of HTML. Magento uses the stored HTML on subsequent requests so the server doesn’t need to generate it each time.

The full page cache that comes with Magento Enterprise is particularly speedy. If you’re not on enterprise though, there are some pretty great add-on extensions for Community that add full page caching. If you’re in search of a speed boost on Community, I recommend installing one.

The main issue I see in most stores is that only some caches are active.

Sometimes there are reasons for a cache to be disabled—maybe a poorly written extension is broken when caches are turned on. Maybe you’re just not 100% confident that something critical won’t break when you turn on a cache.

If either of the above is the case, you should resolve the issue and test in a development environment. Then turn them on and reap the speed benefits! This is easily one of the best suggestions on this list.

Configuring Caches
  1. Visit System > Cache Management
  2. “Select All” caches
  3. Under the “Actions” drop-down, select “Enable”
  4. Submit and you’re done!

2. Flat Tables

Without getting too deep into technical details, Magento has roughly two database modes for products and categories. It can use a huge number of tables to generate the information, or it can use one “flat” table.

There are reasons both modes exist, but you can imagine which is faster. When using flat tables, Magento requires an intermediary step called indexing. For recent versions of Magento, this is reliably triggered every time you save a product. That means it should not affect anything other than speed for customers. Some extensions do have trouble with flat tables, so be sure to test on your development site before making these changes in production.

Configuring Flat Tables
  1. Visit System > Configuration
  2. Click the “Catalog” tab on the left
  3. Open the “Frontend” panel
  4. Change the “Use Flat Catalog Category” and “Use Flat Catalog Product” options to “Yes”
  5. Save and test!

3. Asset Crushing

Magento relies on quite a few Javascript and CSS files to run. Extensions can add even more. On the web, every file downloaded comes with overhead—a connection to the server needs to be established for each file. That means there are efficiencies to packing all your assets into one large file instead of many smaller ones.

Luckily, Magento has just such an option. It will merge all Javascript and CSS files used on your site into one file for each automatically, incorporating any changes to the base JS/CSS files as necessary.

Configuring Asset Crushing
  1. Visit System > Configuration
  2. Click the “Developer” link on the left, near the bottom
  3. Open the “Javascript Settings” and “CSS Settings” panels
  4. Set “Merge Javascript Files” and “Merge CSS Files” to yes.
  5. Save
  6. Merging Javascript can break functionality, depending on what kind of customizations your theme has. Be sure to test!

4. Database Log Cleaning

Magento logs quite a bit of data about each pageview on the site. Over time, this data accumulates in the database. It can grow to a point where each additional log to the database takes a significant amount of time to complete.

Depending on how much traffic your site gets, you might notice a slowdown after only a few months if log cleaning isn’t enabled. Log cleaning culls old entries and keeps the newer ones. Magento’s database logs aren’t used for much, but it’s not a bad idea to keep them around for a few days at least.

Configuring Database Log Cleaning
  1. Visit System > Configuration
  2. Click the “System” link on the left, near the bottom
  3. Open the “Log” panel
  4. Set the following settings:
  5. “Enable Log” Yes
  6. "Save Log, Days” 7
  7. "Enable Log Cleaning” Yes
  8. "Start Time” 0:00:00
  9. "Frequency” Daily
  10. “Error Email Recipient” Your email address
  11. Save and test

Alternative: Disable Database Logs Entirely

You’ve got a nuclear option here too. If you don’t need “recently viewed product” or “compare products” functionality for not logged in customers, you should be able to get away with disabling these logs entirely. That will improve load times even more than keeping the logs clean.

  1. Visit System > Configuration
  2. Click the “System” link on the left, near the bottom
  3. Open the “Log” panel
  4. Set “Enable Log” to No
  5. Save and test

5. Disable Error/Debug Message Logging

Disabling error/debug message logging is last on the list, and should only be done once you’ve diagnosed and resolved all errors on the site. Even then, it can be useful to leave logging enabled to catch rare errors you may not have discovered yet.

Overall, disabling this logging will have a minimal, but measurable impact on site performance. If your site is performing well without throwing errors, it might not be a bad idea to turn off logging.

Disabling Frontend Logging
  1. Visit System > Configuration
  2. Click the “Developer” link on the left, near the bottom
  3. Open the “Log Settings” panelSet “Enabled” to no.
  4. Save and, as usual, test

6. Compilation

This is actually an anti-suggestion, included in case you’ve heard about Magento compilation somewhere else. Compilation is a Magento feature that is—at this point—included for legacy support. It was introduced at a time when PHP had a hard time running codebases as large as Magento’s. That issue has been fixed in all modern versions of PHP (>5.5.0). As long as your server host is running OPcache (ask them), you don’t need compilation.

There you have it!

Faster Magento after flipping just a few switches! Nice work.

Did you run into any issues setting these up? How much faster is your installation now? Let us know in the comments or get in touch.

Related articles

Change Your Magento Admin Password Length
A simple, yet easy way to lock down your Magento account.
Read this article
Don't Let Your Developer Nuke Your SEO
Search engine optimization is important for any blog or E-commerce store looking to grow.
Read this article
6 tips to optimize your eCommerce homepage for conversion
Are you taking advantage of one of your strongest eCommerce assets?
Read this article

Work With Us

We help marketing teams build eCommerce sites that grow.
Find out how.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.