Improving Magento performance | Perpetuum Mobile

Improving Magento performance

Denis Ristić Magento

Magento is known as a 'heavy' eCommerce solution and it can be very slow when not set up correctly. We’ve seen a lot of Magento web shops perform poorly, so we try to do our best to optimize performance for all of the shops Perpetuum Mobile builds.

It's a known fact that faster web shops generate more revenue. With that in mind, here are the steps to improve Magento speed and increase performance.

All tweaks can be divided in three groups: Server optimization, Magento configuration optimization and Magento frontend optimization.

Server environment

The first step is to get a dedicated server (VPS – Virtual Private Server). A VPS enables you to tweak all of the system components such as the filesystem, database, and web server. Also, cloud solutions like AWS (Amazon Web Services) or Azure give you scalability, flexibility and security for your web shop.

If possible, choose a server with SSD (Solid State Drive) drives, split your database, cache web servers. A CDN (Content Delivery Network) will always give you a performance boost.

Use MariaDB instead of MySQL and optimize its configuration. Database configuration is one of the most important aspects of Magento performance. When done properly it can provide performance improvement up to 70%. To configure your MariaDB configuration use a tool like MySQLTuner and MySQLTuningPrimer.

Installing the latest PHP version, depending on you Magento version, can also give you a performance boost. Don’t forget to tweak your php.ini configuration to meet your needs. Install a byte code cache like APC or Opcache.

When it comes to web servers, apache and nginx can be really fast when configured correctly. Some quick fixes: enable Gzip compression, set expiration headers, enable KeepAlive, remove xdebug from production server.

If possible, install and use tools such as Redis and Varnish.

Magento configuration optimization

Here are a few things you can do with your Magento configuration that can increase performance:

  • Use Redis as cache and session storage
  • Use Magento indexes
  • Enable all Magento caches
  • Remove all unused extensions
  • Use flat category and product tables
  • Merge JavaScript and CSS files
  • Install Full Page Cache
  • Use Varnish if possible
  • Disable Magento log
  • Avoid ioncube encrypted extensions
  • Clean up the Magento database and logs
  • Optimize product attributes
  •  Enable Magento compilation
  • Use the latest version of Magento

Magento frontend optimization

Optimizing your template can also speed up your clients’ web shop. Things you can do to optimize your template:

  • Optimize and minimize JavaScript and CSS
  • Compress all images (including product images)
  • Use block cache in extensions
  • Remove all unused blocks from template
  • Remove all unused JavaScript and CSS
  • Use lazy load if possible
  • Use a lightweight template

Conclusion

Use tools like Google Developer Tools, Google Pagespeed, Pingdom and Yslow to test zour Magento web shop and detect performance bottlenecks and improvements.

Increasing performance of your web shop will also give you a small SEO (Search Engine Optimization) boost.

These tips were just guidelines. We’ll be writing in detail how to setup your web server in future blog posts.