How to improve magento site performance
I have setup multi-store magento website, also added full page caching plugin to speedup performance in front-end but still front-end is very slow.
Some reason I figured out from my analysis :
1) TTFB : time to first byte is 2-10 seconds in my magento front-end, as shown in below figure :
2) MySQL query execution time is 4-5 seconds : when I execute any simple query direct in my MySQL database then it return response in 4-5 seconds in first time, that's why any ajax taking time and return response in 4-5 seconds. My MySql setting shown as below :
Please suggest what will I do to improve magento site performance?
magento-1.9 database
bumped to the homepage by Community♦ 6 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
|
show 2 more comments
I have setup multi-store magento website, also added full page caching plugin to speedup performance in front-end but still front-end is very slow.
Some reason I figured out from my analysis :
1) TTFB : time to first byte is 2-10 seconds in my magento front-end, as shown in below figure :
2) MySQL query execution time is 4-5 seconds : when I execute any simple query direct in my MySQL database then it return response in 4-5 seconds in first time, that's why any ajax taking time and return response in 4-5 seconds. My MySql setting shown as below :
Please suggest what will I do to improve magento site performance?
magento-1.9 database
bumped to the homepage by Community♦ 6 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
1
install Aoe_Profiler and check your slow parts
– MagenX
Apr 11 '17 at 6:57
I installed Aoe_Profiler from here github.com/AOEpeople/Aoe_Profiler but it is not working.
– Vinaya Maheshwari
Apr 11 '17 at 7:42
You could also use New Relic to find slow running queries or processes. Did you try to restart MySQL? Could be that one very slow running query is blocking the others, a restart might fix this.
– Niels
Apr 11 '17 at 9:05
But the site is on production server, Sholud I do restart mysql?
– Vinaya Maheshwari
Apr 11 '17 at 9:42
You can use full page cache. There are few extension available to do so.
– inrsaurabh
Apr 16 '17 at 14:21
|
show 2 more comments
I have setup multi-store magento website, also added full page caching plugin to speedup performance in front-end but still front-end is very slow.
Some reason I figured out from my analysis :
1) TTFB : time to first byte is 2-10 seconds in my magento front-end, as shown in below figure :
2) MySQL query execution time is 4-5 seconds : when I execute any simple query direct in my MySQL database then it return response in 4-5 seconds in first time, that's why any ajax taking time and return response in 4-5 seconds. My MySql setting shown as below :
Please suggest what will I do to improve magento site performance?
magento-1.9 database
I have setup multi-store magento website, also added full page caching plugin to speedup performance in front-end but still front-end is very slow.
Some reason I figured out from my analysis :
1) TTFB : time to first byte is 2-10 seconds in my magento front-end, as shown in below figure :
2) MySQL query execution time is 4-5 seconds : when I execute any simple query direct in my MySQL database then it return response in 4-5 seconds in first time, that's why any ajax taking time and return response in 4-5 seconds. My MySql setting shown as below :
Please suggest what will I do to improve magento site performance?
magento-1.9 database
magento-1.9 database
asked Apr 11 '17 at 6:22
Vinaya MaheshwariVinaya Maheshwari
1,18711847
1,18711847
bumped to the homepage by Community♦ 6 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 6 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
1
install Aoe_Profiler and check your slow parts
– MagenX
Apr 11 '17 at 6:57
I installed Aoe_Profiler from here github.com/AOEpeople/Aoe_Profiler but it is not working.
– Vinaya Maheshwari
Apr 11 '17 at 7:42
You could also use New Relic to find slow running queries or processes. Did you try to restart MySQL? Could be that one very slow running query is blocking the others, a restart might fix this.
– Niels
Apr 11 '17 at 9:05
But the site is on production server, Sholud I do restart mysql?
– Vinaya Maheshwari
Apr 11 '17 at 9:42
You can use full page cache. There are few extension available to do so.
– inrsaurabh
Apr 16 '17 at 14:21
|
show 2 more comments
1
install Aoe_Profiler and check your slow parts
– MagenX
Apr 11 '17 at 6:57
I installed Aoe_Profiler from here github.com/AOEpeople/Aoe_Profiler but it is not working.
– Vinaya Maheshwari
Apr 11 '17 at 7:42
You could also use New Relic to find slow running queries or processes. Did you try to restart MySQL? Could be that one very slow running query is blocking the others, a restart might fix this.
– Niels
Apr 11 '17 at 9:05
But the site is on production server, Sholud I do restart mysql?
– Vinaya Maheshwari
Apr 11 '17 at 9:42
You can use full page cache. There are few extension available to do so.
– inrsaurabh
Apr 16 '17 at 14:21
1
1
install Aoe_Profiler and check your slow parts
– MagenX
Apr 11 '17 at 6:57
install Aoe_Profiler and check your slow parts
– MagenX
Apr 11 '17 at 6:57
I installed Aoe_Profiler from here github.com/AOEpeople/Aoe_Profiler but it is not working.
– Vinaya Maheshwari
Apr 11 '17 at 7:42
I installed Aoe_Profiler from here github.com/AOEpeople/Aoe_Profiler but it is not working.
– Vinaya Maheshwari
Apr 11 '17 at 7:42
You could also use New Relic to find slow running queries or processes. Did you try to restart MySQL? Could be that one very slow running query is blocking the others, a restart might fix this.
– Niels
Apr 11 '17 at 9:05
You could also use New Relic to find slow running queries or processes. Did you try to restart MySQL? Could be that one very slow running query is blocking the others, a restart might fix this.
– Niels
Apr 11 '17 at 9:05
But the site is on production server, Sholud I do restart mysql?
– Vinaya Maheshwari
Apr 11 '17 at 9:42
But the site is on production server, Sholud I do restart mysql?
– Vinaya Maheshwari
Apr 11 '17 at 9:42
You can use full page cache. There are few extension available to do so.
– inrsaurabh
Apr 16 '17 at 14:21
You can use full page cache. There are few extension available to do so.
– inrsaurabh
Apr 16 '17 at 14:21
|
show 2 more comments
8 Answers
8
active
oldest
votes
Here is a what I would do in your case:
Install the latest Magento 1.9 on your server to benchmark against. Load it with sample data and compare its speed to the speed of your mult-store installation. If the default M1.9 is significantly faster than your custom site than go to #2 if speed is almost the same contact your hosting or pick another server/hosting - yours is simply not enough for Magento.
Now you know your hosting is OK and it is either a custom extension or a custom template slowing you down. I saw you couldn't install Aoe profiler - give it another try and make it work. It will show you what part of your code is slow. If you can't install it go to step #3.
Disable all of your custom extensions. If speed goes up then you know that it is one of your 3rd party plugins that is the problem. Enable them one by one and find it. Once found contact it's vendor or simply find an alternative. If disabling all plugins has no effect change your custom theme to default rwd theme. Does it help? Then it is your theme and you should contact the vendor who sold (developed) it for you.
Hope you find the bottleneck.
In my personal experience it is most probably a poorly coded 3rd party extension observer that is executed on every page request and making things slow.
add a comment |
An ecommerce store is full of images and banners for obvious reasons. To make sure that the images aren’t affecting your site’s performance, optimize them accordingly. The images that appear on the main site should be compressed for less data usage and easy page loads. While the product images should be in JPEG format, PNG and SVG format is recommended for logo and layout of your Magento 2 site.
One of the problems identified in the slowdown of Magento 2 sites had been the read speed of the database. If your Magento 2 store has a wide range of products, you are likely to face this problem more. To increase the read speed of your database, you should enable flat categories and products. By doing this, you can minimize the number of database joins done when it shows the products. It leads to the reduction of MySQL query complexity and your site’s performance is improved. To change the settings, you can go to your backend settings, select ‘catalog’ from the ‘configuration’ header, and mark ‘Yes’ for the ‘Use Flat Catalog Category’.
add a comment |
- Enable Flat catalog
- SSD
- Enable cache
- Redis for cache
- PHP7
- Mysql - latest version
- Also, check your custom extensions - maybe some process of event/observer stopped Magento
also,
take a look,
if category include a lot of products > 500
this category page will be slow
for Magento better category with no much products
Layer navigation - really slow.
add a comment |
To improve Magento site :
- Enable Gzip compression
- Merge JS & Css
- add Expire geader
- optimize all images
- aviod 404 (not found) error
- minify js , Css & html
7.Enable cache
8.Enable Flat catalog
add a comment |
MAGENTO PERFORMANCE TESTING TOOLS:
Before we start looking at the Magento speed optimisation steps, it is better to first discuss the choices you have to determine the actual page load time of your Magento store. Though, a quick Google search query will give you a long list of websites which will provide basic information around your website’s speed, I would recommend looking to use yslow or Google Page Speed Tool, as they are the most widely used tools and will give you accurate results.
If you already have a Magento store, I’d suggest that you check its page load time before you start the following the following performance optimisation techniques, and see how much your website’s performance improves. Don’t forget to provide your feedback in the comments section below.
Another thing to think about is that each of your page templates will have different page load speeds, because of the reliance on different files and front-end assets. It’s important to monitor and test each page type and then use the methods below to optimise each one.
OPTIMISING MAGENTO’S PERFORMANCE
SERVER CONSIDERATIONS
If you are in the process of launching a new store and are looking at hosting options for your Magento store, the first step towards optimising Magento performance should be to find a good server, which is suitable for Magento. Really, any Magento store should be using an optimised dedicated server, but if there are cost constraints, as there usually are for smaller merchants, then you should find some reliable shared hosting company which specialises in Magento hosting.
In the past I’ve used Rackspace, Nexcess and Peer1 (all specialists in Magento hosting), as well as SWBroadband for smaller Magento websites. Sonassi also have a really strong reputation in the Magento community.
ADMIN PANEL CHANGES
The fastest and easiest way to significantly increase your Magento store’s performance is by making some basic changes to the admin panel. The following are relatively easy things to change but can have a big impact on the load time of your website.
First of all go to System > Configuration > Catalog > FrontEnd and select “Yes” for both ‘Use Flat Catalog Category’ and ‘Use Flat Catalog Product’.
Secondly, we have to disable logging in the log settings. For that go to System -> Configuration -> Advanced -> Developer -> Log Settings and make sure log settings is not enabled.
Another important step is to enable cleaning of cron and log at regular intervals. For that go to System > Configuration > Advanced > System -> Log Cleaning, here you should enable log cleaning and set the minimum possible time which is viable for you.
Now, we’ll enable merging of CSS and JS files at the time of page loading. Although this a fundamental step in the process of improving the speed of your store, it can also cause problems, so I’d suggest you don’t look at this without the assistance of an experienced Magento developer.
Making this change will help to reduce the number of requests to the server, which will definitely help to improve page load time. To do that, go to System > Configuration > Developer. Here you’ll see Merge JavaScript Files and Merge CSS Files. Set both these fields to Yes, and hit Save.
Once this is done, we’ll run the Magento compilation process. In this step Magento will compile all of its files to create a single include path, which will help us reduce page load time by up to 50%. To run this compilation process, go to System > Tools > Compilation. In the top-right hand corner, you’ll see the Run Compilation Process button. Click on that and you’re done.
If you experience any problem in running this compilation, please make sure that the directory ‘includes’ and the file ‘includes/config.php’ are both writable.
The last change we want to make in the admin panel is enabling the Magento cache. This way Magento stores will load the resources at the first page request, which will allow the use of the already downloaded resources for subsequent page requests being loaded. This will help us to reduce page load time significantly. To enable Magento cache, go to System > Cache Management. Select all cache types and from the top-right corner drop down select Enable and submit.
.HTACCESS CHANGES
Now, we’ll start making some changes in Magento’s .htaccess file. For this purpose you have to locate the .htaccess file located in the Magento root directory. If you can’t find this, try creating a new one.
This part is only really relevant to Magento websites that are using Apache servers and not Nginx – so this may not be relevant to all readers. Also, people running Magento Enterprise websites are probably not going to be using the .htaccess with Apache because it’s slower.
Through this .htaccess file, we’ll do couple of things. First of all, we’ll add expiration durations in headers. That means, until the duration mentioned in headers is not expired, Magento will keep using cached version of the files, and will not download new ones. Secondly, we’ll do content encoding to compress the files before sending them to requesting agents. As files will be smaller, they’ll be download faster.
First of all, we need to place an expiration limit on the headers, by adding this code into the .htaccess file:
#
First of all enable expirations
ExpiresActive On
Default expiration
ExpiresDefault “access plus 1 month”
For favicon
ExpiresByType image/x-icon “access plus 1 year”
Set Images Expiry
ExpiresByType image/gif “access plus 1 month”
ExpiresByType image/png “access plus 1 month”
ExpiresByType image/jpg “access plus 1 month”
ExpiresByType image/jpeg “access plus 1 month”
Set CSS Expiry
ExpiresByType text/css “access 1 month”
For Javascript Expiry
ExpiresByType application/javascript “access plus 1 year”
#
Now to enable the compression, uncomment this line of code in your default .htaccess file, so you’ll need to remove the # before php_flag zlib.output_compression on:
#
enable resulting html compression
php_flag zlib.output_compression on
#
Next, to set gzip compression into action, we’ll add these lines into the .htaccess file:
#
Inserting filter on all content
SetOutputFilter DEFLATE
Inserting filter only on selected content types
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript
Tackling some Netscape 4.x problems
BrowserMatch ^Mozilla/4 gzip-only-text/html
Tackling some Netscape 4.06-4.08 problems
BrowserMatch ^Mozilla/4.0[678] no-gzip
Scenario: MSIE masquerades as Netscape
BrowserMatch bMSIE !no-gzip !gzip-only-text/html
Command for not compressing images
SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary
Handling Proxies correctly
Header append Vary User-Agent env=!dont-vary
#
SOME USEFUL EXTENSIONS:
There are lots of extensions available for Magento, which enable fast caching and will help to significantly reduce page load time, but there are two which are considered to be the best options. One is Turpentine, which is based on varnish, and the other is Magento Full Page Cache. Both are extremely good extensions. Plus, the key advantage of using Turpentine is that its free, but if you’re looking to achieve the best impact in terms of performance, Full Page Cache has proved to be much better than Turpentine, but it costs around €349.
Image optimisation
If you’re using large images on your site, chances are this is going to have a considerable impact on your performance, especially on image-heavy pages. I’d suggest serving your images via a CDN, such as CloudFlare or OnePica, which will mean your images are loaded from another server and will prevent unnecessary stress on your server when loading pages.
For more enterprise-level websites, I’d suggest using Cloudinary, which is an advanced image management solution that has the potential to reduce the load time associated with images considerably. Cloudinary serves all images via a fast CDN and also allows you to dynamically serve hi-res images and manipulate images on the fly via short URLs.
JPEGmini is another good resource that’s worth looking at for image compression.
CONCLUDING THOUGHTS
I hope these simple steps will help you to substantially reduce your page load time. If you have followed this guide and put the steps into practice and measure your store’s page load time before and after the optimisation, you should see a clear improvement. Don’t forget to leave feedback in the comments section below – any further guidance would be greatly appreciated.
Here are a few other less major things that can be done to also help to improve performance:
Avoid unnecessary redirects (adding redirects to the .htaccess will impact page load speed – this is a mistake that lots of merchants make when they re-platform and apply manual page-level redirects)
Look at Memcache
Use a simple, clean page template as a base
Optimise your images
Additional reading:
–
Also, I’d suggest looking at Varnish, Redis and Google Pagespeed as well, as these also represent great resources for improving performance.
add a comment |
To speed up your magento installation, you must follow the steps given below.
- Measure your website performance at gtmetrix.com or tools.pingdom.com.
- Step 1 will give you ranking and issue that might exist in your code base.
- Follow page speed guidelines given in the step 2.
- mostly things are taken care by .htaccess located at magento root folder.
- in .htaccess few things to consider. enable compression using mod_deflate, enable expiry header using mod_headers and mod_expires. Code can be found on Google.
- Disable magento cache.
- Merge CSS and JS and minify them. Do Minify HTML.
- Enable Cache again.
As you have mentioned, 1st response is slow then contact your hosting provider for the same. It might be issue for slow performance if above step does not solve it.
You can enable Varnish Cache too.
add a comment |
Follow these tips to improve your Magento performance:
Install and Configure Varnish Cache
Merge JS and CSS Files
Caching Magento
Optimize Images
Flat Catalog Categories and Products
add a comment |
Magento 2 has fixed many issues with the previous version, but there is still a lot you can do to improve performance of your Magento 2 site. If you have a Magento 2 site, the following tips to speed up magento site.
- Server requirement and configuration
- Optimize Images
- Enable Flat Catalogue
- Optimize JS and CSS files
- Choose the right Content Delivery Network
- Set off Code Generation
- Use Full Page Cache.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "479"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f169550%2fhow-to-improve-magento-site-performance%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
8 Answers
8
active
oldest
votes
8 Answers
8
active
oldest
votes
active
oldest
votes
active
oldest
votes
Here is a what I would do in your case:
Install the latest Magento 1.9 on your server to benchmark against. Load it with sample data and compare its speed to the speed of your mult-store installation. If the default M1.9 is significantly faster than your custom site than go to #2 if speed is almost the same contact your hosting or pick another server/hosting - yours is simply not enough for Magento.
Now you know your hosting is OK and it is either a custom extension or a custom template slowing you down. I saw you couldn't install Aoe profiler - give it another try and make it work. It will show you what part of your code is slow. If you can't install it go to step #3.
Disable all of your custom extensions. If speed goes up then you know that it is one of your 3rd party plugins that is the problem. Enable them one by one and find it. Once found contact it's vendor or simply find an alternative. If disabling all plugins has no effect change your custom theme to default rwd theme. Does it help? Then it is your theme and you should contact the vendor who sold (developed) it for you.
Hope you find the bottleneck.
In my personal experience it is most probably a poorly coded 3rd party extension observer that is executed on every page request and making things slow.
add a comment |
Here is a what I would do in your case:
Install the latest Magento 1.9 on your server to benchmark against. Load it with sample data and compare its speed to the speed of your mult-store installation. If the default M1.9 is significantly faster than your custom site than go to #2 if speed is almost the same contact your hosting or pick another server/hosting - yours is simply not enough for Magento.
Now you know your hosting is OK and it is either a custom extension or a custom template slowing you down. I saw you couldn't install Aoe profiler - give it another try and make it work. It will show you what part of your code is slow. If you can't install it go to step #3.
Disable all of your custom extensions. If speed goes up then you know that it is one of your 3rd party plugins that is the problem. Enable them one by one and find it. Once found contact it's vendor or simply find an alternative. If disabling all plugins has no effect change your custom theme to default rwd theme. Does it help? Then it is your theme and you should contact the vendor who sold (developed) it for you.
Hope you find the bottleneck.
In my personal experience it is most probably a poorly coded 3rd party extension observer that is executed on every page request and making things slow.
add a comment |
Here is a what I would do in your case:
Install the latest Magento 1.9 on your server to benchmark against. Load it with sample data and compare its speed to the speed of your mult-store installation. If the default M1.9 is significantly faster than your custom site than go to #2 if speed is almost the same contact your hosting or pick another server/hosting - yours is simply not enough for Magento.
Now you know your hosting is OK and it is either a custom extension or a custom template slowing you down. I saw you couldn't install Aoe profiler - give it another try and make it work. It will show you what part of your code is slow. If you can't install it go to step #3.
Disable all of your custom extensions. If speed goes up then you know that it is one of your 3rd party plugins that is the problem. Enable them one by one and find it. Once found contact it's vendor or simply find an alternative. If disabling all plugins has no effect change your custom theme to default rwd theme. Does it help? Then it is your theme and you should contact the vendor who sold (developed) it for you.
Hope you find the bottleneck.
In my personal experience it is most probably a poorly coded 3rd party extension observer that is executed on every page request and making things slow.
Here is a what I would do in your case:
Install the latest Magento 1.9 on your server to benchmark against. Load it with sample data and compare its speed to the speed of your mult-store installation. If the default M1.9 is significantly faster than your custom site than go to #2 if speed is almost the same contact your hosting or pick another server/hosting - yours is simply not enough for Magento.
Now you know your hosting is OK and it is either a custom extension or a custom template slowing you down. I saw you couldn't install Aoe profiler - give it another try and make it work. It will show you what part of your code is slow. If you can't install it go to step #3.
Disable all of your custom extensions. If speed goes up then you know that it is one of your 3rd party plugins that is the problem. Enable them one by one and find it. Once found contact it's vendor or simply find an alternative. If disabling all plugins has no effect change your custom theme to default rwd theme. Does it help? Then it is your theme and you should contact the vendor who sold (developed) it for you.
Hope you find the bottleneck.
In my personal experience it is most probably a poorly coded 3rd party extension observer that is executed on every page request and making things slow.
answered Apr 18 '17 at 1:49
Konstantin GerasimovKonstantin Gerasimov
3,505830
3,505830
add a comment |
add a comment |
An ecommerce store is full of images and banners for obvious reasons. To make sure that the images aren’t affecting your site’s performance, optimize them accordingly. The images that appear on the main site should be compressed for less data usage and easy page loads. While the product images should be in JPEG format, PNG and SVG format is recommended for logo and layout of your Magento 2 site.
One of the problems identified in the slowdown of Magento 2 sites had been the read speed of the database. If your Magento 2 store has a wide range of products, you are likely to face this problem more. To increase the read speed of your database, you should enable flat categories and products. By doing this, you can minimize the number of database joins done when it shows the products. It leads to the reduction of MySQL query complexity and your site’s performance is improved. To change the settings, you can go to your backend settings, select ‘catalog’ from the ‘configuration’ header, and mark ‘Yes’ for the ‘Use Flat Catalog Category’.
add a comment |
An ecommerce store is full of images and banners for obvious reasons. To make sure that the images aren’t affecting your site’s performance, optimize them accordingly. The images that appear on the main site should be compressed for less data usage and easy page loads. While the product images should be in JPEG format, PNG and SVG format is recommended for logo and layout of your Magento 2 site.
One of the problems identified in the slowdown of Magento 2 sites had been the read speed of the database. If your Magento 2 store has a wide range of products, you are likely to face this problem more. To increase the read speed of your database, you should enable flat categories and products. By doing this, you can minimize the number of database joins done when it shows the products. It leads to the reduction of MySQL query complexity and your site’s performance is improved. To change the settings, you can go to your backend settings, select ‘catalog’ from the ‘configuration’ header, and mark ‘Yes’ for the ‘Use Flat Catalog Category’.
add a comment |
An ecommerce store is full of images and banners for obvious reasons. To make sure that the images aren’t affecting your site’s performance, optimize them accordingly. The images that appear on the main site should be compressed for less data usage and easy page loads. While the product images should be in JPEG format, PNG and SVG format is recommended for logo and layout of your Magento 2 site.
One of the problems identified in the slowdown of Magento 2 sites had been the read speed of the database. If your Magento 2 store has a wide range of products, you are likely to face this problem more. To increase the read speed of your database, you should enable flat categories and products. By doing this, you can minimize the number of database joins done when it shows the products. It leads to the reduction of MySQL query complexity and your site’s performance is improved. To change the settings, you can go to your backend settings, select ‘catalog’ from the ‘configuration’ header, and mark ‘Yes’ for the ‘Use Flat Catalog Category’.
An ecommerce store is full of images and banners for obvious reasons. To make sure that the images aren’t affecting your site’s performance, optimize them accordingly. The images that appear on the main site should be compressed for less data usage and easy page loads. While the product images should be in JPEG format, PNG and SVG format is recommended for logo and layout of your Magento 2 site.
One of the problems identified in the slowdown of Magento 2 sites had been the read speed of the database. If your Magento 2 store has a wide range of products, you are likely to face this problem more. To increase the read speed of your database, you should enable flat categories and products. By doing this, you can minimize the number of database joins done when it shows the products. It leads to the reduction of MySQL query complexity and your site’s performance is improved. To change the settings, you can go to your backend settings, select ‘catalog’ from the ‘configuration’ header, and mark ‘Yes’ for the ‘Use Flat Catalog Category’.
answered May 8 '17 at 12:06
BiztechStoreBiztechStore
13
13
add a comment |
add a comment |
- Enable Flat catalog
- SSD
- Enable cache
- Redis for cache
- PHP7
- Mysql - latest version
- Also, check your custom extensions - maybe some process of event/observer stopped Magento
also,
take a look,
if category include a lot of products > 500
this category page will be slow
for Magento better category with no much products
Layer navigation - really slow.
add a comment |
- Enable Flat catalog
- SSD
- Enable cache
- Redis for cache
- PHP7
- Mysql - latest version
- Also, check your custom extensions - maybe some process of event/observer stopped Magento
also,
take a look,
if category include a lot of products > 500
this category page will be slow
for Magento better category with no much products
Layer navigation - really slow.
add a comment |
- Enable Flat catalog
- SSD
- Enable cache
- Redis for cache
- PHP7
- Mysql - latest version
- Also, check your custom extensions - maybe some process of event/observer stopped Magento
also,
take a look,
if category include a lot of products > 500
this category page will be slow
for Magento better category with no much products
Layer navigation - really slow.
- Enable Flat catalog
- SSD
- Enable cache
- Redis for cache
- PHP7
- Mysql - latest version
- Also, check your custom extensions - maybe some process of event/observer stopped Magento
also,
take a look,
if category include a lot of products > 500
this category page will be slow
for Magento better category with no much products
Layer navigation - really slow.
edited May 9 '17 at 4:49
Teja Bhagavan Kollepara
3,00641949
3,00641949
answered May 8 '17 at 8:03
AlexAlex
255210
255210
add a comment |
add a comment |
To improve Magento site :
- Enable Gzip compression
- Merge JS & Css
- add Expire geader
- optimize all images
- aviod 404 (not found) error
- minify js , Css & html
7.Enable cache
8.Enable Flat catalog
add a comment |
To improve Magento site :
- Enable Gzip compression
- Merge JS & Css
- add Expire geader
- optimize all images
- aviod 404 (not found) error
- minify js , Css & html
7.Enable cache
8.Enable Flat catalog
add a comment |
To improve Magento site :
- Enable Gzip compression
- Merge JS & Css
- add Expire geader
- optimize all images
- aviod 404 (not found) error
- minify js , Css & html
7.Enable cache
8.Enable Flat catalog
To improve Magento site :
- Enable Gzip compression
- Merge JS & Css
- add Expire geader
- optimize all images
- aviod 404 (not found) error
- minify js , Css & html
7.Enable cache
8.Enable Flat catalog
edited Jul 4 '17 at 13:54
Piyush
4,82972054
4,82972054
answered Jul 4 '17 at 13:35
Charvi ParikhCharvi Parikh
592615
592615
add a comment |
add a comment |
MAGENTO PERFORMANCE TESTING TOOLS:
Before we start looking at the Magento speed optimisation steps, it is better to first discuss the choices you have to determine the actual page load time of your Magento store. Though, a quick Google search query will give you a long list of websites which will provide basic information around your website’s speed, I would recommend looking to use yslow or Google Page Speed Tool, as they are the most widely used tools and will give you accurate results.
If you already have a Magento store, I’d suggest that you check its page load time before you start the following the following performance optimisation techniques, and see how much your website’s performance improves. Don’t forget to provide your feedback in the comments section below.
Another thing to think about is that each of your page templates will have different page load speeds, because of the reliance on different files and front-end assets. It’s important to monitor and test each page type and then use the methods below to optimise each one.
OPTIMISING MAGENTO’S PERFORMANCE
SERVER CONSIDERATIONS
If you are in the process of launching a new store and are looking at hosting options for your Magento store, the first step towards optimising Magento performance should be to find a good server, which is suitable for Magento. Really, any Magento store should be using an optimised dedicated server, but if there are cost constraints, as there usually are for smaller merchants, then you should find some reliable shared hosting company which specialises in Magento hosting.
In the past I’ve used Rackspace, Nexcess and Peer1 (all specialists in Magento hosting), as well as SWBroadband for smaller Magento websites. Sonassi also have a really strong reputation in the Magento community.
ADMIN PANEL CHANGES
The fastest and easiest way to significantly increase your Magento store’s performance is by making some basic changes to the admin panel. The following are relatively easy things to change but can have a big impact on the load time of your website.
First of all go to System > Configuration > Catalog > FrontEnd and select “Yes” for both ‘Use Flat Catalog Category’ and ‘Use Flat Catalog Product’.
Secondly, we have to disable logging in the log settings. For that go to System -> Configuration -> Advanced -> Developer -> Log Settings and make sure log settings is not enabled.
Another important step is to enable cleaning of cron and log at regular intervals. For that go to System > Configuration > Advanced > System -> Log Cleaning, here you should enable log cleaning and set the minimum possible time which is viable for you.
Now, we’ll enable merging of CSS and JS files at the time of page loading. Although this a fundamental step in the process of improving the speed of your store, it can also cause problems, so I’d suggest you don’t look at this without the assistance of an experienced Magento developer.
Making this change will help to reduce the number of requests to the server, which will definitely help to improve page load time. To do that, go to System > Configuration > Developer. Here you’ll see Merge JavaScript Files and Merge CSS Files. Set both these fields to Yes, and hit Save.
Once this is done, we’ll run the Magento compilation process. In this step Magento will compile all of its files to create a single include path, which will help us reduce page load time by up to 50%. To run this compilation process, go to System > Tools > Compilation. In the top-right hand corner, you’ll see the Run Compilation Process button. Click on that and you’re done.
If you experience any problem in running this compilation, please make sure that the directory ‘includes’ and the file ‘includes/config.php’ are both writable.
The last change we want to make in the admin panel is enabling the Magento cache. This way Magento stores will load the resources at the first page request, which will allow the use of the already downloaded resources for subsequent page requests being loaded. This will help us to reduce page load time significantly. To enable Magento cache, go to System > Cache Management. Select all cache types and from the top-right corner drop down select Enable and submit.
.HTACCESS CHANGES
Now, we’ll start making some changes in Magento’s .htaccess file. For this purpose you have to locate the .htaccess file located in the Magento root directory. If you can’t find this, try creating a new one.
This part is only really relevant to Magento websites that are using Apache servers and not Nginx – so this may not be relevant to all readers. Also, people running Magento Enterprise websites are probably not going to be using the .htaccess with Apache because it’s slower.
Through this .htaccess file, we’ll do couple of things. First of all, we’ll add expiration durations in headers. That means, until the duration mentioned in headers is not expired, Magento will keep using cached version of the files, and will not download new ones. Secondly, we’ll do content encoding to compress the files before sending them to requesting agents. As files will be smaller, they’ll be download faster.
First of all, we need to place an expiration limit on the headers, by adding this code into the .htaccess file:
#
First of all enable expirations
ExpiresActive On
Default expiration
ExpiresDefault “access plus 1 month”
For favicon
ExpiresByType image/x-icon “access plus 1 year”
Set Images Expiry
ExpiresByType image/gif “access plus 1 month”
ExpiresByType image/png “access plus 1 month”
ExpiresByType image/jpg “access plus 1 month”
ExpiresByType image/jpeg “access plus 1 month”
Set CSS Expiry
ExpiresByType text/css “access 1 month”
For Javascript Expiry
ExpiresByType application/javascript “access plus 1 year”
#
Now to enable the compression, uncomment this line of code in your default .htaccess file, so you’ll need to remove the # before php_flag zlib.output_compression on:
#
enable resulting html compression
php_flag zlib.output_compression on
#
Next, to set gzip compression into action, we’ll add these lines into the .htaccess file:
#
Inserting filter on all content
SetOutputFilter DEFLATE
Inserting filter only on selected content types
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript
Tackling some Netscape 4.x problems
BrowserMatch ^Mozilla/4 gzip-only-text/html
Tackling some Netscape 4.06-4.08 problems
BrowserMatch ^Mozilla/4.0[678] no-gzip
Scenario: MSIE masquerades as Netscape
BrowserMatch bMSIE !no-gzip !gzip-only-text/html
Command for not compressing images
SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary
Handling Proxies correctly
Header append Vary User-Agent env=!dont-vary
#
SOME USEFUL EXTENSIONS:
There are lots of extensions available for Magento, which enable fast caching and will help to significantly reduce page load time, but there are two which are considered to be the best options. One is Turpentine, which is based on varnish, and the other is Magento Full Page Cache. Both are extremely good extensions. Plus, the key advantage of using Turpentine is that its free, but if you’re looking to achieve the best impact in terms of performance, Full Page Cache has proved to be much better than Turpentine, but it costs around €349.
Image optimisation
If you’re using large images on your site, chances are this is going to have a considerable impact on your performance, especially on image-heavy pages. I’d suggest serving your images via a CDN, such as CloudFlare or OnePica, which will mean your images are loaded from another server and will prevent unnecessary stress on your server when loading pages.
For more enterprise-level websites, I’d suggest using Cloudinary, which is an advanced image management solution that has the potential to reduce the load time associated with images considerably. Cloudinary serves all images via a fast CDN and also allows you to dynamically serve hi-res images and manipulate images on the fly via short URLs.
JPEGmini is another good resource that’s worth looking at for image compression.
CONCLUDING THOUGHTS
I hope these simple steps will help you to substantially reduce your page load time. If you have followed this guide and put the steps into practice and measure your store’s page load time before and after the optimisation, you should see a clear improvement. Don’t forget to leave feedback in the comments section below – any further guidance would be greatly appreciated.
Here are a few other less major things that can be done to also help to improve performance:
Avoid unnecessary redirects (adding redirects to the .htaccess will impact page load speed – this is a mistake that lots of merchants make when they re-platform and apply manual page-level redirects)
Look at Memcache
Use a simple, clean page template as a base
Optimise your images
Additional reading:
–
Also, I’d suggest looking at Varnish, Redis and Google Pagespeed as well, as these also represent great resources for improving performance.
add a comment |
MAGENTO PERFORMANCE TESTING TOOLS:
Before we start looking at the Magento speed optimisation steps, it is better to first discuss the choices you have to determine the actual page load time of your Magento store. Though, a quick Google search query will give you a long list of websites which will provide basic information around your website’s speed, I would recommend looking to use yslow or Google Page Speed Tool, as they are the most widely used tools and will give you accurate results.
If you already have a Magento store, I’d suggest that you check its page load time before you start the following the following performance optimisation techniques, and see how much your website’s performance improves. Don’t forget to provide your feedback in the comments section below.
Another thing to think about is that each of your page templates will have different page load speeds, because of the reliance on different files and front-end assets. It’s important to monitor and test each page type and then use the methods below to optimise each one.
OPTIMISING MAGENTO’S PERFORMANCE
SERVER CONSIDERATIONS
If you are in the process of launching a new store and are looking at hosting options for your Magento store, the first step towards optimising Magento performance should be to find a good server, which is suitable for Magento. Really, any Magento store should be using an optimised dedicated server, but if there are cost constraints, as there usually are for smaller merchants, then you should find some reliable shared hosting company which specialises in Magento hosting.
In the past I’ve used Rackspace, Nexcess and Peer1 (all specialists in Magento hosting), as well as SWBroadband for smaller Magento websites. Sonassi also have a really strong reputation in the Magento community.
ADMIN PANEL CHANGES
The fastest and easiest way to significantly increase your Magento store’s performance is by making some basic changes to the admin panel. The following are relatively easy things to change but can have a big impact on the load time of your website.
First of all go to System > Configuration > Catalog > FrontEnd and select “Yes” for both ‘Use Flat Catalog Category’ and ‘Use Flat Catalog Product’.
Secondly, we have to disable logging in the log settings. For that go to System -> Configuration -> Advanced -> Developer -> Log Settings and make sure log settings is not enabled.
Another important step is to enable cleaning of cron and log at regular intervals. For that go to System > Configuration > Advanced > System -> Log Cleaning, here you should enable log cleaning and set the minimum possible time which is viable for you.
Now, we’ll enable merging of CSS and JS files at the time of page loading. Although this a fundamental step in the process of improving the speed of your store, it can also cause problems, so I’d suggest you don’t look at this without the assistance of an experienced Magento developer.
Making this change will help to reduce the number of requests to the server, which will definitely help to improve page load time. To do that, go to System > Configuration > Developer. Here you’ll see Merge JavaScript Files and Merge CSS Files. Set both these fields to Yes, and hit Save.
Once this is done, we’ll run the Magento compilation process. In this step Magento will compile all of its files to create a single include path, which will help us reduce page load time by up to 50%. To run this compilation process, go to System > Tools > Compilation. In the top-right hand corner, you’ll see the Run Compilation Process button. Click on that and you’re done.
If you experience any problem in running this compilation, please make sure that the directory ‘includes’ and the file ‘includes/config.php’ are both writable.
The last change we want to make in the admin panel is enabling the Magento cache. This way Magento stores will load the resources at the first page request, which will allow the use of the already downloaded resources for subsequent page requests being loaded. This will help us to reduce page load time significantly. To enable Magento cache, go to System > Cache Management. Select all cache types and from the top-right corner drop down select Enable and submit.
.HTACCESS CHANGES
Now, we’ll start making some changes in Magento’s .htaccess file. For this purpose you have to locate the .htaccess file located in the Magento root directory. If you can’t find this, try creating a new one.
This part is only really relevant to Magento websites that are using Apache servers and not Nginx – so this may not be relevant to all readers. Also, people running Magento Enterprise websites are probably not going to be using the .htaccess with Apache because it’s slower.
Through this .htaccess file, we’ll do couple of things. First of all, we’ll add expiration durations in headers. That means, until the duration mentioned in headers is not expired, Magento will keep using cached version of the files, and will not download new ones. Secondly, we’ll do content encoding to compress the files before sending them to requesting agents. As files will be smaller, they’ll be download faster.
First of all, we need to place an expiration limit on the headers, by adding this code into the .htaccess file:
#
First of all enable expirations
ExpiresActive On
Default expiration
ExpiresDefault “access plus 1 month”
For favicon
ExpiresByType image/x-icon “access plus 1 year”
Set Images Expiry
ExpiresByType image/gif “access plus 1 month”
ExpiresByType image/png “access plus 1 month”
ExpiresByType image/jpg “access plus 1 month”
ExpiresByType image/jpeg “access plus 1 month”
Set CSS Expiry
ExpiresByType text/css “access 1 month”
For Javascript Expiry
ExpiresByType application/javascript “access plus 1 year”
#
Now to enable the compression, uncomment this line of code in your default .htaccess file, so you’ll need to remove the # before php_flag zlib.output_compression on:
#
enable resulting html compression
php_flag zlib.output_compression on
#
Next, to set gzip compression into action, we’ll add these lines into the .htaccess file:
#
Inserting filter on all content
SetOutputFilter DEFLATE
Inserting filter only on selected content types
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript
Tackling some Netscape 4.x problems
BrowserMatch ^Mozilla/4 gzip-only-text/html
Tackling some Netscape 4.06-4.08 problems
BrowserMatch ^Mozilla/4.0[678] no-gzip
Scenario: MSIE masquerades as Netscape
BrowserMatch bMSIE !no-gzip !gzip-only-text/html
Command for not compressing images
SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary
Handling Proxies correctly
Header append Vary User-Agent env=!dont-vary
#
SOME USEFUL EXTENSIONS:
There are lots of extensions available for Magento, which enable fast caching and will help to significantly reduce page load time, but there are two which are considered to be the best options. One is Turpentine, which is based on varnish, and the other is Magento Full Page Cache. Both are extremely good extensions. Plus, the key advantage of using Turpentine is that its free, but if you’re looking to achieve the best impact in terms of performance, Full Page Cache has proved to be much better than Turpentine, but it costs around €349.
Image optimisation
If you’re using large images on your site, chances are this is going to have a considerable impact on your performance, especially on image-heavy pages. I’d suggest serving your images via a CDN, such as CloudFlare or OnePica, which will mean your images are loaded from another server and will prevent unnecessary stress on your server when loading pages.
For more enterprise-level websites, I’d suggest using Cloudinary, which is an advanced image management solution that has the potential to reduce the load time associated with images considerably. Cloudinary serves all images via a fast CDN and also allows you to dynamically serve hi-res images and manipulate images on the fly via short URLs.
JPEGmini is another good resource that’s worth looking at for image compression.
CONCLUDING THOUGHTS
I hope these simple steps will help you to substantially reduce your page load time. If you have followed this guide and put the steps into practice and measure your store’s page load time before and after the optimisation, you should see a clear improvement. Don’t forget to leave feedback in the comments section below – any further guidance would be greatly appreciated.
Here are a few other less major things that can be done to also help to improve performance:
Avoid unnecessary redirects (adding redirects to the .htaccess will impact page load speed – this is a mistake that lots of merchants make when they re-platform and apply manual page-level redirects)
Look at Memcache
Use a simple, clean page template as a base
Optimise your images
Additional reading:
–
Also, I’d suggest looking at Varnish, Redis and Google Pagespeed as well, as these also represent great resources for improving performance.
add a comment |
MAGENTO PERFORMANCE TESTING TOOLS:
Before we start looking at the Magento speed optimisation steps, it is better to first discuss the choices you have to determine the actual page load time of your Magento store. Though, a quick Google search query will give you a long list of websites which will provide basic information around your website’s speed, I would recommend looking to use yslow or Google Page Speed Tool, as they are the most widely used tools and will give you accurate results.
If you already have a Magento store, I’d suggest that you check its page load time before you start the following the following performance optimisation techniques, and see how much your website’s performance improves. Don’t forget to provide your feedback in the comments section below.
Another thing to think about is that each of your page templates will have different page load speeds, because of the reliance on different files and front-end assets. It’s important to monitor and test each page type and then use the methods below to optimise each one.
OPTIMISING MAGENTO’S PERFORMANCE
SERVER CONSIDERATIONS
If you are in the process of launching a new store and are looking at hosting options for your Magento store, the first step towards optimising Magento performance should be to find a good server, which is suitable for Magento. Really, any Magento store should be using an optimised dedicated server, but if there are cost constraints, as there usually are for smaller merchants, then you should find some reliable shared hosting company which specialises in Magento hosting.
In the past I’ve used Rackspace, Nexcess and Peer1 (all specialists in Magento hosting), as well as SWBroadband for smaller Magento websites. Sonassi also have a really strong reputation in the Magento community.
ADMIN PANEL CHANGES
The fastest and easiest way to significantly increase your Magento store’s performance is by making some basic changes to the admin panel. The following are relatively easy things to change but can have a big impact on the load time of your website.
First of all go to System > Configuration > Catalog > FrontEnd and select “Yes” for both ‘Use Flat Catalog Category’ and ‘Use Flat Catalog Product’.
Secondly, we have to disable logging in the log settings. For that go to System -> Configuration -> Advanced -> Developer -> Log Settings and make sure log settings is not enabled.
Another important step is to enable cleaning of cron and log at regular intervals. For that go to System > Configuration > Advanced > System -> Log Cleaning, here you should enable log cleaning and set the minimum possible time which is viable for you.
Now, we’ll enable merging of CSS and JS files at the time of page loading. Although this a fundamental step in the process of improving the speed of your store, it can also cause problems, so I’d suggest you don’t look at this without the assistance of an experienced Magento developer.
Making this change will help to reduce the number of requests to the server, which will definitely help to improve page load time. To do that, go to System > Configuration > Developer. Here you’ll see Merge JavaScript Files and Merge CSS Files. Set both these fields to Yes, and hit Save.
Once this is done, we’ll run the Magento compilation process. In this step Magento will compile all of its files to create a single include path, which will help us reduce page load time by up to 50%. To run this compilation process, go to System > Tools > Compilation. In the top-right hand corner, you’ll see the Run Compilation Process button. Click on that and you’re done.
If you experience any problem in running this compilation, please make sure that the directory ‘includes’ and the file ‘includes/config.php’ are both writable.
The last change we want to make in the admin panel is enabling the Magento cache. This way Magento stores will load the resources at the first page request, which will allow the use of the already downloaded resources for subsequent page requests being loaded. This will help us to reduce page load time significantly. To enable Magento cache, go to System > Cache Management. Select all cache types and from the top-right corner drop down select Enable and submit.
.HTACCESS CHANGES
Now, we’ll start making some changes in Magento’s .htaccess file. For this purpose you have to locate the .htaccess file located in the Magento root directory. If you can’t find this, try creating a new one.
This part is only really relevant to Magento websites that are using Apache servers and not Nginx – so this may not be relevant to all readers. Also, people running Magento Enterprise websites are probably not going to be using the .htaccess with Apache because it’s slower.
Through this .htaccess file, we’ll do couple of things. First of all, we’ll add expiration durations in headers. That means, until the duration mentioned in headers is not expired, Magento will keep using cached version of the files, and will not download new ones. Secondly, we’ll do content encoding to compress the files before sending them to requesting agents. As files will be smaller, they’ll be download faster.
First of all, we need to place an expiration limit on the headers, by adding this code into the .htaccess file:
#
First of all enable expirations
ExpiresActive On
Default expiration
ExpiresDefault “access plus 1 month”
For favicon
ExpiresByType image/x-icon “access plus 1 year”
Set Images Expiry
ExpiresByType image/gif “access plus 1 month”
ExpiresByType image/png “access plus 1 month”
ExpiresByType image/jpg “access plus 1 month”
ExpiresByType image/jpeg “access plus 1 month”
Set CSS Expiry
ExpiresByType text/css “access 1 month”
For Javascript Expiry
ExpiresByType application/javascript “access plus 1 year”
#
Now to enable the compression, uncomment this line of code in your default .htaccess file, so you’ll need to remove the # before php_flag zlib.output_compression on:
#
enable resulting html compression
php_flag zlib.output_compression on
#
Next, to set gzip compression into action, we’ll add these lines into the .htaccess file:
#
Inserting filter on all content
SetOutputFilter DEFLATE
Inserting filter only on selected content types
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript
Tackling some Netscape 4.x problems
BrowserMatch ^Mozilla/4 gzip-only-text/html
Tackling some Netscape 4.06-4.08 problems
BrowserMatch ^Mozilla/4.0[678] no-gzip
Scenario: MSIE masquerades as Netscape
BrowserMatch bMSIE !no-gzip !gzip-only-text/html
Command for not compressing images
SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary
Handling Proxies correctly
Header append Vary User-Agent env=!dont-vary
#
SOME USEFUL EXTENSIONS:
There are lots of extensions available for Magento, which enable fast caching and will help to significantly reduce page load time, but there are two which are considered to be the best options. One is Turpentine, which is based on varnish, and the other is Magento Full Page Cache. Both are extremely good extensions. Plus, the key advantage of using Turpentine is that its free, but if you’re looking to achieve the best impact in terms of performance, Full Page Cache has proved to be much better than Turpentine, but it costs around €349.
Image optimisation
If you’re using large images on your site, chances are this is going to have a considerable impact on your performance, especially on image-heavy pages. I’d suggest serving your images via a CDN, such as CloudFlare or OnePica, which will mean your images are loaded from another server and will prevent unnecessary stress on your server when loading pages.
For more enterprise-level websites, I’d suggest using Cloudinary, which is an advanced image management solution that has the potential to reduce the load time associated with images considerably. Cloudinary serves all images via a fast CDN and also allows you to dynamically serve hi-res images and manipulate images on the fly via short URLs.
JPEGmini is another good resource that’s worth looking at for image compression.
CONCLUDING THOUGHTS
I hope these simple steps will help you to substantially reduce your page load time. If you have followed this guide and put the steps into practice and measure your store’s page load time before and after the optimisation, you should see a clear improvement. Don’t forget to leave feedback in the comments section below – any further guidance would be greatly appreciated.
Here are a few other less major things that can be done to also help to improve performance:
Avoid unnecessary redirects (adding redirects to the .htaccess will impact page load speed – this is a mistake that lots of merchants make when they re-platform and apply manual page-level redirects)
Look at Memcache
Use a simple, clean page template as a base
Optimise your images
Additional reading:
–
Also, I’d suggest looking at Varnish, Redis and Google Pagespeed as well, as these also represent great resources for improving performance.
MAGENTO PERFORMANCE TESTING TOOLS:
Before we start looking at the Magento speed optimisation steps, it is better to first discuss the choices you have to determine the actual page load time of your Magento store. Though, a quick Google search query will give you a long list of websites which will provide basic information around your website’s speed, I would recommend looking to use yslow or Google Page Speed Tool, as they are the most widely used tools and will give you accurate results.
If you already have a Magento store, I’d suggest that you check its page load time before you start the following the following performance optimisation techniques, and see how much your website’s performance improves. Don’t forget to provide your feedback in the comments section below.
Another thing to think about is that each of your page templates will have different page load speeds, because of the reliance on different files and front-end assets. It’s important to monitor and test each page type and then use the methods below to optimise each one.
OPTIMISING MAGENTO’S PERFORMANCE
SERVER CONSIDERATIONS
If you are in the process of launching a new store and are looking at hosting options for your Magento store, the first step towards optimising Magento performance should be to find a good server, which is suitable for Magento. Really, any Magento store should be using an optimised dedicated server, but if there are cost constraints, as there usually are for smaller merchants, then you should find some reliable shared hosting company which specialises in Magento hosting.
In the past I’ve used Rackspace, Nexcess and Peer1 (all specialists in Magento hosting), as well as SWBroadband for smaller Magento websites. Sonassi also have a really strong reputation in the Magento community.
ADMIN PANEL CHANGES
The fastest and easiest way to significantly increase your Magento store’s performance is by making some basic changes to the admin panel. The following are relatively easy things to change but can have a big impact on the load time of your website.
First of all go to System > Configuration > Catalog > FrontEnd and select “Yes” for both ‘Use Flat Catalog Category’ and ‘Use Flat Catalog Product’.
Secondly, we have to disable logging in the log settings. For that go to System -> Configuration -> Advanced -> Developer -> Log Settings and make sure log settings is not enabled.
Another important step is to enable cleaning of cron and log at regular intervals. For that go to System > Configuration > Advanced > System -> Log Cleaning, here you should enable log cleaning and set the minimum possible time which is viable for you.
Now, we’ll enable merging of CSS and JS files at the time of page loading. Although this a fundamental step in the process of improving the speed of your store, it can also cause problems, so I’d suggest you don’t look at this without the assistance of an experienced Magento developer.
Making this change will help to reduce the number of requests to the server, which will definitely help to improve page load time. To do that, go to System > Configuration > Developer. Here you’ll see Merge JavaScript Files and Merge CSS Files. Set both these fields to Yes, and hit Save.
Once this is done, we’ll run the Magento compilation process. In this step Magento will compile all of its files to create a single include path, which will help us reduce page load time by up to 50%. To run this compilation process, go to System > Tools > Compilation. In the top-right hand corner, you’ll see the Run Compilation Process button. Click on that and you’re done.
If you experience any problem in running this compilation, please make sure that the directory ‘includes’ and the file ‘includes/config.php’ are both writable.
The last change we want to make in the admin panel is enabling the Magento cache. This way Magento stores will load the resources at the first page request, which will allow the use of the already downloaded resources for subsequent page requests being loaded. This will help us to reduce page load time significantly. To enable Magento cache, go to System > Cache Management. Select all cache types and from the top-right corner drop down select Enable and submit.
.HTACCESS CHANGES
Now, we’ll start making some changes in Magento’s .htaccess file. For this purpose you have to locate the .htaccess file located in the Magento root directory. If you can’t find this, try creating a new one.
This part is only really relevant to Magento websites that are using Apache servers and not Nginx – so this may not be relevant to all readers. Also, people running Magento Enterprise websites are probably not going to be using the .htaccess with Apache because it’s slower.
Through this .htaccess file, we’ll do couple of things. First of all, we’ll add expiration durations in headers. That means, until the duration mentioned in headers is not expired, Magento will keep using cached version of the files, and will not download new ones. Secondly, we’ll do content encoding to compress the files before sending them to requesting agents. As files will be smaller, they’ll be download faster.
First of all, we need to place an expiration limit on the headers, by adding this code into the .htaccess file:
#
First of all enable expirations
ExpiresActive On
Default expiration
ExpiresDefault “access plus 1 month”
For favicon
ExpiresByType image/x-icon “access plus 1 year”
Set Images Expiry
ExpiresByType image/gif “access plus 1 month”
ExpiresByType image/png “access plus 1 month”
ExpiresByType image/jpg “access plus 1 month”
ExpiresByType image/jpeg “access plus 1 month”
Set CSS Expiry
ExpiresByType text/css “access 1 month”
For Javascript Expiry
ExpiresByType application/javascript “access plus 1 year”
#
Now to enable the compression, uncomment this line of code in your default .htaccess file, so you’ll need to remove the # before php_flag zlib.output_compression on:
#
enable resulting html compression
php_flag zlib.output_compression on
#
Next, to set gzip compression into action, we’ll add these lines into the .htaccess file:
#
Inserting filter on all content
SetOutputFilter DEFLATE
Inserting filter only on selected content types
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript
Tackling some Netscape 4.x problems
BrowserMatch ^Mozilla/4 gzip-only-text/html
Tackling some Netscape 4.06-4.08 problems
BrowserMatch ^Mozilla/4.0[678] no-gzip
Scenario: MSIE masquerades as Netscape
BrowserMatch bMSIE !no-gzip !gzip-only-text/html
Command for not compressing images
SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary
Handling Proxies correctly
Header append Vary User-Agent env=!dont-vary
#
SOME USEFUL EXTENSIONS:
There are lots of extensions available for Magento, which enable fast caching and will help to significantly reduce page load time, but there are two which are considered to be the best options. One is Turpentine, which is based on varnish, and the other is Magento Full Page Cache. Both are extremely good extensions. Plus, the key advantage of using Turpentine is that its free, but if you’re looking to achieve the best impact in terms of performance, Full Page Cache has proved to be much better than Turpentine, but it costs around €349.
Image optimisation
If you’re using large images on your site, chances are this is going to have a considerable impact on your performance, especially on image-heavy pages. I’d suggest serving your images via a CDN, such as CloudFlare or OnePica, which will mean your images are loaded from another server and will prevent unnecessary stress on your server when loading pages.
For more enterprise-level websites, I’d suggest using Cloudinary, which is an advanced image management solution that has the potential to reduce the load time associated with images considerably. Cloudinary serves all images via a fast CDN and also allows you to dynamically serve hi-res images and manipulate images on the fly via short URLs.
JPEGmini is another good resource that’s worth looking at for image compression.
CONCLUDING THOUGHTS
I hope these simple steps will help you to substantially reduce your page load time. If you have followed this guide and put the steps into practice and measure your store’s page load time before and after the optimisation, you should see a clear improvement. Don’t forget to leave feedback in the comments section below – any further guidance would be greatly appreciated.
Here are a few other less major things that can be done to also help to improve performance:
Avoid unnecessary redirects (adding redirects to the .htaccess will impact page load speed – this is a mistake that lots of merchants make when they re-platform and apply manual page-level redirects)
Look at Memcache
Use a simple, clean page template as a base
Optimise your images
Additional reading:
–
Also, I’d suggest looking at Varnish, Redis and Google Pagespeed as well, as these also represent great resources for improving performance.
answered Sep 22 '17 at 13:19
DivyeshDivyesh
835321
835321
add a comment |
add a comment |
To speed up your magento installation, you must follow the steps given below.
- Measure your website performance at gtmetrix.com or tools.pingdom.com.
- Step 1 will give you ranking and issue that might exist in your code base.
- Follow page speed guidelines given in the step 2.
- mostly things are taken care by .htaccess located at magento root folder.
- in .htaccess few things to consider. enable compression using mod_deflate, enable expiry header using mod_headers and mod_expires. Code can be found on Google.
- Disable magento cache.
- Merge CSS and JS and minify them. Do Minify HTML.
- Enable Cache again.
As you have mentioned, 1st response is slow then contact your hosting provider for the same. It might be issue for slow performance if above step does not solve it.
You can enable Varnish Cache too.
add a comment |
To speed up your magento installation, you must follow the steps given below.
- Measure your website performance at gtmetrix.com or tools.pingdom.com.
- Step 1 will give you ranking and issue that might exist in your code base.
- Follow page speed guidelines given in the step 2.
- mostly things are taken care by .htaccess located at magento root folder.
- in .htaccess few things to consider. enable compression using mod_deflate, enable expiry header using mod_headers and mod_expires. Code can be found on Google.
- Disable magento cache.
- Merge CSS and JS and minify them. Do Minify HTML.
- Enable Cache again.
As you have mentioned, 1st response is slow then contact your hosting provider for the same. It might be issue for slow performance if above step does not solve it.
You can enable Varnish Cache too.
add a comment |
To speed up your magento installation, you must follow the steps given below.
- Measure your website performance at gtmetrix.com or tools.pingdom.com.
- Step 1 will give you ranking and issue that might exist in your code base.
- Follow page speed guidelines given in the step 2.
- mostly things are taken care by .htaccess located at magento root folder.
- in .htaccess few things to consider. enable compression using mod_deflate, enable expiry header using mod_headers and mod_expires. Code can be found on Google.
- Disable magento cache.
- Merge CSS and JS and minify them. Do Minify HTML.
- Enable Cache again.
As you have mentioned, 1st response is slow then contact your hosting provider for the same. It might be issue for slow performance if above step does not solve it.
You can enable Varnish Cache too.
To speed up your magento installation, you must follow the steps given below.
- Measure your website performance at gtmetrix.com or tools.pingdom.com.
- Step 1 will give you ranking and issue that might exist in your code base.
- Follow page speed guidelines given in the step 2.
- mostly things are taken care by .htaccess located at magento root folder.
- in .htaccess few things to consider. enable compression using mod_deflate, enable expiry header using mod_headers and mod_expires. Code can be found on Google.
- Disable magento cache.
- Merge CSS and JS and minify them. Do Minify HTML.
- Enable Cache again.
As you have mentioned, 1st response is slow then contact your hosting provider for the same. It might be issue for slow performance if above step does not solve it.
You can enable Varnish Cache too.
answered Oct 10 '17 at 6:03
Amit SankhalaAmit Sankhala
112
112
add a comment |
add a comment |
Follow these tips to improve your Magento performance:
Install and Configure Varnish Cache
Merge JS and CSS Files
Caching Magento
Optimize Images
Flat Catalog Categories and Products
add a comment |
Follow these tips to improve your Magento performance:
Install and Configure Varnish Cache
Merge JS and CSS Files
Caching Magento
Optimize Images
Flat Catalog Categories and Products
add a comment |
Follow these tips to improve your Magento performance:
Install and Configure Varnish Cache
Merge JS and CSS Files
Caching Magento
Optimize Images
Flat Catalog Categories and Products
Follow these tips to improve your Magento performance:
Install and Configure Varnish Cache
Merge JS and CSS Files
Caching Magento
Optimize Images
Flat Catalog Categories and Products
edited Jan 11 '18 at 8:39
Marius♦
167k28321687
167k28321687
answered Jul 27 '17 at 7:36
Syed Muneeb Ul HasanSyed Muneeb Ul Hasan
640317
640317
add a comment |
add a comment |
Magento 2 has fixed many issues with the previous version, but there is still a lot you can do to improve performance of your Magento 2 site. If you have a Magento 2 site, the following tips to speed up magento site.
- Server requirement and configuration
- Optimize Images
- Enable Flat Catalogue
- Optimize JS and CSS files
- Choose the right Content Delivery Network
- Set off Code Generation
- Use Full Page Cache.
add a comment |
Magento 2 has fixed many issues with the previous version, but there is still a lot you can do to improve performance of your Magento 2 site. If you have a Magento 2 site, the following tips to speed up magento site.
- Server requirement and configuration
- Optimize Images
- Enable Flat Catalogue
- Optimize JS and CSS files
- Choose the right Content Delivery Network
- Set off Code Generation
- Use Full Page Cache.
add a comment |
Magento 2 has fixed many issues with the previous version, but there is still a lot you can do to improve performance of your Magento 2 site. If you have a Magento 2 site, the following tips to speed up magento site.
- Server requirement and configuration
- Optimize Images
- Enable Flat Catalogue
- Optimize JS and CSS files
- Choose the right Content Delivery Network
- Set off Code Generation
- Use Full Page Cache.
Magento 2 has fixed many issues with the previous version, but there is still a lot you can do to improve performance of your Magento 2 site. If you have a Magento 2 site, the following tips to speed up magento site.
- Server requirement and configuration
- Optimize Images
- Enable Flat Catalogue
- Optimize JS and CSS files
- Choose the right Content Delivery Network
- Set off Code Generation
- Use Full Page Cache.
answered Apr 25 '18 at 10:15
NiraleeNiralee
1
1
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f169550%2fhow-to-improve-magento-site-performance%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
install Aoe_Profiler and check your slow parts
– MagenX
Apr 11 '17 at 6:57
I installed Aoe_Profiler from here github.com/AOEpeople/Aoe_Profiler but it is not working.
– Vinaya Maheshwari
Apr 11 '17 at 7:42
You could also use New Relic to find slow running queries or processes. Did you try to restart MySQL? Could be that one very slow running query is blocking the others, a restart might fix this.
– Niels
Apr 11 '17 at 9:05
But the site is on production server, Sholud I do restart mysql?
– Vinaya Maheshwari
Apr 11 '17 at 9:42
You can use full page cache. There are few extension available to do so.
– inrsaurabh
Apr 16 '17 at 14:21