HOW TO SPEED UP YOUR MAGENTO E-COMMERCE WEBSITE?

May 25th, 2017| By

Magento is the most widely used e-Commerce platform and best choice of growing online businesses. Common reasons of such popularity of Magento are features, scalability, flexibility, system security and reliability compared to most other eCommerce platforms.

Following are some Tips & Tricks to speed up your Magento website. We’ve tried to split into three different sections to make it easy to understand.

  1. Basic tips — Take care of some points before heading to Magento
  2. Server & Mysql Configuration — Best way to get results
  3. Magento Configuration — Use built-in powerful tool to Optimize Magento

BASIC TIPS

Things you need to take care before setting up Magento.

#1 Use latest version of Magento

If You’ve missed, Upgrade to Latest Version of Magento 2.0

Every new release of Magento improves performance and patches to make your website more secure and optimized. Magento 2.0 on PHP 7 is 25% more powerful in terms of performance.

DOWNLOAD MAGENTO 2

#2 Server Requirement

  • Use the dedicated server or VPS, do not pick shared hosting option.
  • Choose Magento Optimized Hosting provider. Nexcess, Zerolag, Rackspace

#3 Content Delivery Network

CDN is the best way to reduce load on your server and improves your Magento performance. By CDN, Static assets ( Images, Javascripts, CSS) would be served from multiple locations of the globe which ensure you about faster delivery of website components.

Server & MySQL configuration to Boost Magento Performance

#1 PHP Accelerators

Install PHP Accelerators like APC, XCache, EAccelerator, Zend Optimizer. Accelerators improves performance of PHP.

#2 Optimize MySQL Server

Query caching is best way to improve performance. MySQL has it’s own Query caching settings. You need change few configuration in My.cnf.

query_cache_type = 1
query_cache_size = 32M
query_cache_limit=2M

Also change PHP memory limit,

php_value memory_limit 512M

#3 Setup Reverse Proxy Server

Varnish Cache is a web application accelerator also known as a caching HTTP reverse proxy. You can install it in front of any server that speaks HTTP and configure it to cache the contents. Varnish Cache is really, really fast. It typically speeds up delivery with a factor of 300–1000x, depending on your architecture.

Magento Configuration

Apply following configuration to improve performance of Magento

#1 CACHING — Cache everything that you can.

As I said, Many businesses have achieved great success by applying

APC + Memcache + Varnish caching

Magento has built in caching solution. Navigating to “System” → “Cache Management”. Just enable all cache types and you’re done.

Browser caching is one of the best method to leverage the performance. Add .htaccess file to your root directory and implement Gzip compression, add expiry header to static media such as images, css & javascripts.

Gzip Compression

<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>

Cache Control

# 1 Month for most static assets
<filesMatch ".(css|jpg|jpeg|png|gif|js|ico)$">
Header set Cache-Control "max-age=2592000, public"
</filesMatch>

Enable Keep Alive

<ifModule mod_headers.c> Header set Connection keep-alive </ifModule>

Page Caching is again one of the best method to speed up. This method reduces the load of web-server and deliver content from cached pages.

Popular page caching extensions available for Magento,

#2 Defer Javascript loading

Defer loading can help to improve performance but sometime it breaks dependent functionality.

<script src="demo_defer.js" defer></script>

#3 Merge CSS and Javascripts

Magento has so many inbuilt powerful features to improve speed. One of them is CSS and Javascript merging into one file. Such method can reduce HTTP requests to the server and help to improve performance.

  1. Navigate to “System” → “Advanced” → “Developer.”
  2. Under “JavaScript Settings” and “CSS Settings” change the drop-down to “Yes” and click on “Save Config.”
  3. Don’t forget to clear Magento cache. Navigate to “System” → “Cache Management”

You can also Minify CSS & Javascripts, It helps to reduce overall size of webpage.

#4 Enable Flat Catalog

By enabling Flat catalog in Magento improves performance of MySQL queries. Flat catalog converts EAV(Entity Attribute Value) model into one table, product data will be merged into one table.

  1. Navigate to “Stores” → “Configuration” → “Catalog.”
  2. Under “Storefront” change “Use Flat Catalog Category” and “Use Flat Catalog Product” to “Yes.”
  3. Don’t forget to clear Magento cache. Navigate to “System” → “Cache Management”

#5 Enable Magento Compilation

Up to 50% of performance boost has been reported by enabling Magento Compilation feature. Magento compiler compiles all the files and stores them to single directory. It caches most frequently used files.

  1. Navigate to “System” → “Tools” → “Compilation.”
  2. Click on “Run Compilation Process.”

Note: Disable and Clear compiled files when you add new functionality to Magento.

#6 Magento Database Logs

  1. Navigate to “Stores” → “Configuration” → “Advanced”→ “System” → “Log.”
  2. Under “Save Log, Days” change it to 14 days, or whatever you prefer.
  3. Click on “Save Config.”

#7 Image Optimization

Always use compressed images to reduce size of webpage. There are few lossless image compression tools available to Magento store. You can also use Photoshop to compress images.

Summary

As you can see there are many ways you can speed up your Magento eCommerce site. From implementing a CDN to caching, image optimization, merging CSS and JS files, enabling flat catalog, Magento Compiler, and cleaning up your database. Purchase good Hosting solution to improve magento speed.

At Elitech, We have an expert web development team of exceptionally talented, trained and well experienced front end developers and PHP Programmers who have strongly contributed in producing outstanding custom Magento eCommerce web applications.

We provide custom Magento development services including theme customization, payment gateway integration and Magento latest version up-gradation. Our developer’s strong technical & domain expertise can contribute immensely to grow your business online.