How to Speed Up Magento – Real Quick Guide

It seems that I’m constantly needing to speed up Magento for different clients and its so time consuming to go through all of the tutorials and suggestions.

I’m going to break it down in the fastest way possible and leave out anything that takes more than 5 minutes, feel free to skip steps.

This GUIDE is the REAL quick way of doing it. I bare no responsibility for how your magento functions after! It should be fine.

Magento 1.5.1+

Step 1. Combining CSS/JS

To turn this on, go in the Magento Admin Panel to “System” > “Configuration”, from the left navigation panel, click on “Developer” link from the “Advance” panel (all the way at the bottom). Look for the two tabs “Javascript Settings” and “CSS Settings” and you want to select “Yes” for the Merge files options in both.

Step 2. Enable GZIP

.htaccess

############################################
## enable apache served files compression
## http://developer.yahoo.com/performance/rules.html#gzip

# Insert filter
SetOutputFilter DEFLATE

# Netscape 4.x has some problems…
BrowserMatch ^Mozilla/4 gzip-only-text/html

# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip

# MSIE masquerades as Netscape, but it is fine
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# Don’t compress images
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary

# Make sure proxies don’t deliver the wrong content
Header append Vary User-Agent env=!dont-vary

Remove #

# enable resulting html compression
php_flag zlib.output_compression on

Step 3.Fix MYSQL Caching

/etc/my.cnf

key_buffer = 512M
max_allowed_packet = 64M
table_cache = 512
sort_buffer_size = 4m
read_buffer_size = 4m
read_rnd_buffer_size = 2m
myisam_sort_buffer_size = 64m
tmp_table_size = 128m
query_cache_size = 96m
query_cache_type = 1
thread_cache_size = 8
max_connections = 400
wait_timeout = 300

Step 4. Fix File Caching

/home/yoursitename/public_html/app/etc/local.xml

Change files to db or xcache memcache apc

<cache>
<backend>apc</backend>
<prefix>alphanumeric</prefix>
</cache>

Step 5. Keep Alives On

/etc/httpd/httpd.conf

KeepAlive on

Step 5. Turn Logging Off

In the Magento Admin Panel go to “System” > “Configuration”, from the left panel choose “Advanced” from the “Advanced” Panel at the bottom left. Look for the module “Mage_Log” and set it to ‘disable’ and save.

More Information

Sources: Blasted Thing | Activo | Webpage Speed Test | Great Magento Templates

Posted in Tips & Code

4 ResponsesComments Feed

  1. Thanks admin for your nice info for speed up Magento! I just think you share right thought in your opinion.

    06/15/11, 11:18 am
  2. relax

    Thanks a lot, this was really helpful and quick!

    06/15/11, 2:20 pm
  3. Great article.
    Speeding up Magento is a sorted after request.

    Regards,
    Mick

    06/16/11, 12:11 am
  4. simon

    Thanks for the guide.
    One question: where ist the /etc/my.cnf file? in public_html or in magento folder? have no such file.

    Thanks

    10/20/11, 4:15 pm

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>