At the end of last month, somebody calling me and said that he read my post on opencart forum on how to increase opencart performance. It was a post in 2015, and i am totally forgot about that post.
He ask me to help with his website which at that time only has 40k items. The website load very slow, measured with gtmetrix the statistic was terrible. He said that he want his website as fast as the website i manage which has more than 10 million items (www.booksbeyond.co.id)
The website he own load very slow, measured with gtmetrix.com the statistic was terrible.
I decide to help him to optimize the performance. The result measured again using gtmetrix.com:
What is the optimization?
- Optimize your MySql database, sample from my.cnf setting
slow_query_log = 1
long_query_time = 1
slow_query_log_file = /var/lib/mysql/mysql_slow_query.log
- Please note, this setting are related to your server specification (Memory and CPU).
- Install mod_pagespeed. Find more about page speed in https://developers.google.com/speed/pagespeed/module/
- Install page cache module on your opencart. I use free module from budgetneon (https://github.com/budgetneon/pagecache)
- Install Sphinx Search module on opencart (https://www.opencart.com/index.php?route=marketplace/extension/info&extension_id=18266&filter_search=sphinx)
- On opencart setting – server, make sure you set the gzip compression more than 0.
- Make sure that there are no broken link on your website.
- Make sure you don’t resize image through css or html. If you want to display 200×200 px image, make the image file exactly 200×200 px.
Using my guideline, i can guarantee that your opencart performance will improve a lot. However if you need help, please contact me through email@example.com