11 Tips to Optimize Magento Site Speed and Performance

11 Tips to Optimize Magento Site Speed and Performance

“47% of consumers expect a web page to load in less than 2 seconds.”
“21% mobile users said that they expect load time on their smartphones to be equal to that of desktop.”

If you own an online e-commerce store, page loading speeds are very important. And if you don’t own one, it is time for eCommerce Website Development in Magento 2. It is one of the ways to increase customer satisfaction.

Because a customer does not wait for more than 3 seconds, an online business owner has to be careful to serve product pages, landing pages, and possibly all site pages within just this much time.

For this reason, I have compiled this article to show you valuable tips and information that decrease page loading time, specifically for Magento stores.

I have tried to describe all tips in the simplest manner possible, still, if you aren’t
tech person, you may have to put a little more effort but it will save you from spending coins with a DIY approach as opposed to hiring developers.

Let us not waste our time on less technical talks, we will take a fast-paced optimization.

Look at Magento 2 performance optimization tips

Avoid poor performance of webshop

1. Host Magento store on a dedicated server

Shared hosting is one where multiple websites are hosted on the same machine. High traffic sites in this situation snatch away costly resources like CPU, memory, etc., and cause other websites on the same server to render slow webpages.
Magento Development Company

If your Google Analytics exhibit a sufficient number of visits every hour say at least 100+ Unbounce visitors average an hour, a dedicated server is pursuable.

2. Hosting country

Beneficial is choosing a hosting company that owns servers in the country where your target customers are.

3. Software Versions

For any or all types of software including Magento framework, Apache or another web server in place, database product version, etc., update them from time to time to get new features, better security, and performance.Viha Digital Commerce Blog Content Helps
If your web host manages web server products, ask to upgrade sooner than later or change vendor.

4. Images:

Crop unnecessary white spaces from images.
Use GIF, PNG files instead of JPG.
Check the total size of all images in a web page through browser extensions like Firebug.

5. Make no room for unused extensions

Don’t get lazy in clean up.
Disable and remove Magento extensions that you installed previously but now are sure of no use.

Note:
After disabling all scrub extensions if the Magento store yet performs slow, try to ask any PHP/Magento programmer to comment or delete modules that are good for nothing. Rather doing it yourself.

6. Measure how many requests your website can take-up

Using Google Speed Tracker, Pingdom, etc. is good.
There is a more discreet tool: Apache Benchmark ( ab )
Magento Store Data Migration
Take, for example, the following command will test how fast yourwebsite.com can handle 100 requests.

Among these 100 requests, 10 are concurrent:
ab -n 100 -c 10 http://www.yourwebsite.com/
This is to be typed at the command line of the Apache Benchmark tool that you can install by entering the command

Sudo apt-get installs apache2-utils on Ubuntu Linux, for windows please download from Apache Benchmark’s site.

Please go through related text on the web, this is just to show you a new way to measure performance.

7. Hardware considerations

Check website performance by increasing CPU or RAM or Disk(I/O) rate or all 3 together.
This is to say that set up the development environment of your Magento site in Oracle Virtual Box and issue above ab command.

Then increase hardware inputs to the guest OS and check results again, if significant differences are seen, the bottleneck is not in the software. Adding more hardware resources in this case is beneficial.

8. Select certified web hosting company for expert Magento installation

Magento Inc. maintains a country-wise list of hosting companies that provide proficient Magento installation on their server for free, you can consult any of them as the first-time setup plays a major role in the ongoing journey of a website.

To mention just a few, below are parameters to think of at Magento installation time:

  • Amount of web space and I/O performances
  • Virus scanner
  • Data transfer (traffic/bandwidth)
  • Root access FTP, PHP, Perl, SSI, .htaccess, SSH, MySQL, and crontabs
  • SSL (secure server)
  • E-mail, POP
  • Control panel
  • Multiple domain hosting and subdomains
  • Web server and operating system
  • Monthly/quarterly/annual payment plans
  • Customer support 24 x 7

9. Use Content Delivery Network (CDN)

If your customer base is widely spread across multiple countries, and traffic to
site is high, CDN is a good solution in that situation.
Hire Certified Magento Developers India
CDN is a large distributed system of servers that are deployed globally and serves a copy of images, objects, and files from closest to the customer server thereby dramatically decrease response time.

10. Apply proper configurations on the web server of the Magento store

Out of major web servers supported by the Magento platform, two are primarily utilized:
1. Apache
2. Nginx
Nginx is not widely used and a bit harder to integrate, hence we will go through tweaks of Apache alone.
Magento Customization Service
To realize the advantages offered by web server tweaks mentioned herein, you can prop up ab tool explained above while not changing the hardware settings.
For Apache, how to leverage Magento speed optimization access :
After installing or in pre-given available Apache web server, add below code snippets at end of the .htaccess file you see at the root level:
It will compress images, HTML files, CSS, and javascript code also reduces transferring time of data from server to user computer.

AddOutputFilterByType DEFLATE text/html text/plain text/xml
text/css text/javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSIE !no-gzip !gzip-only-text/html SetEnvIfNoCase
Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary Header append
Vary User-Agent env=!dont-vary

Also, add below more statements at end of the same .htaccess file and restart Apache.
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15

StartServers 25
MinSpareServers 25
MaxSpareServers 35
ServerLimit 256
MaxClients 256
MaxRequestsPerChild 10000

Relaunch ab tool and server stress will have been reduced in MBs.
Although Apache covers nearly 45% stake of all web servers deployed on websites globally, Nginx fewer times outperforms it – from experiences, we’ll unfortunately not look into it, please see related sources on the web.
This is perhaps the most powerful way if your Magento website is loading very slow

11. Tuning MySQL database engine &  Leverage Caching
MySQL tuning Primer script is the file that comes to your rescue to do so.
Sometimes when all other tricks do not provide performance remunerations collaboratively, the final point to optimize the website is to tune the MySQL database engine.
Ecommerce Web Development Services
To get recommendations for what should be adjusted in your setup, issue tuning primer script at operating system shell.

$ wget https://launchpad.net/mysql-tuning-primer/trunk/1.6-r1/+download/tuning-primer.sh
$ sudo chmod +x tuning-primer.sh
$ ./tuning-primer.sh

You may be asked the root username and password before the script can complete successfully.
Once execution is over, make necessary changes in my.cnf file which you get in results of the above script.

You may even improvise by optimizing Magento database tables and by replicating MySQL database if your business is indeed a saturated traffic E-commerce store.

To implement both of these, It is recommended to hire a Certified Magento developer who will do it for you as I believe the technicality of these tasks should be unaffordable for a non-IT business owner.

A cache is system software that stores computed data to serve future requests
faster.
There are several brands of cache mechanisms available in the market that offer different types of caching.

The most standard and safe way is to enable the cache option from within the Magento admin panel before installing any third-party software, from System | Cache Management, as given in the below screenshot.

eCommerce, CMS web Development Company India

Here, enable all including

  • EAV types and attributes
  • Collections Data
  • Both the Web Services Configuration options

Amongst other caching systems, popularly used are Varnish, Alternative PHP cache, and Memcached – subject to your wish and your production environment.

Apart from above techniques, there also comes kinds of Magento speed optimization extension which you need to check thoroughly before installing one.

    • amount of good reviews
    • number of installations until the date
    • diversified client base
    • version compatibility &
    • launch date & price

are premier factors to assess before buying any extension.

I hope reading the above text has been fruitful for you and hasn’t been a waste of time.

Viha Digital Commerce Pvt. Ltd. (VDC) provides all types of support and full-cycle setup services to create lucrative Magento stores for any business.

If you are tired of too many variable prices offered by different Magento service providers and seeking a standard, no-tweaky response, call us on +91 7096620202

or drop the requirements file at info@vihadigitalcommerce.com to get a free quote for your project.

2 Comments

  1. Meaningful article for Magento owners and also other e-commerce owners, I was facing loading issue and tried Cloudways full page cache extension. The store is now performing well and speed is 2 second.

    1. Thank you Alex. We are Glad you find our content article useful, We have certified developers which are always keen to solve any difficult equations in Magento.

Comments are closed.