ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

How can i increase/improve performance of my Magento website (community version 1.9)?

user-image
تم إضافة السؤال من قبل Islam AlZatary , Sr. Software engineer manager at Evalufy (Bayt product) , Bayt.com
تاريخ النشر: 2015/04/07
Atif Aqeel
من قبل Atif Aqeel , Founder And Director , Xesense

1. Enable Flat Categories and Products

In Magento admin, (top menu) System > Configuration, (left nav) Catalog > Catalog, (main page) Frontend.  Set “Use Flat Catalog Category” and “Use Flat Catalog Product” to “Yes“.

Attributes that apply to Categories and Products are stored in separate database tables depending on their dataypes. ‘Flattening’ will put all attributes in one table for Magento retrieve. This will have a positive impact on site speed especially if it has1,000 or more products

2. Merge CSS and JS Files

In Magento admin, (top menu) System > Configuration, (left nav) Advanced > Developer, (main page) JavaScript Settings, CSS Settings. Set “Merge Javascript” Files and “Merge CSS” Files to “Yes”.

A Magento site can have many CSS and javascript files and there will be more that come with extensions and site customizations. Doing step #2, will combine all CSS and javascript into one file which will make each page load faster.

3. Enable Compilation

In Magento admin, (top menu) System > Tools > Compilation, click Enable. This will take all the active scripts in Magento’s core structure and bring them to the front for faster website speed.

If updates, code modifications, extension installations are needed, Compilation needs to be disabled first. If not, there will be errors.

4. Caching Magento

When all other settings are in place and the site is ready to go live, go to System > Cache Management. Select all items, set the Action dropdown to “Enable” then hit Submit

The above settings will help increase the performance of an average Magento website. Those who are accustomed to server administration can do more. There are caching extensions that can be incorporated within Magento’s configuration file and other server tricks to speed up Magento.

مستخدم محذوف‎
من قبل مستخدم محذوف‎

In addition to the answer from Atif:

Make use of a CDN caching service like Cloudflare

Consider upgrading to PHP7. It DRASTICALLY improved my first byte response and decreased the load on my server so i dont need to upgrade for now :-)

Support for PHP7 doesnt come out of the box so there is an extension that fixes this: https://github.com/Inchoo/Inchoo_PHP7. PHP7 support is included with Magento2.

Whilst it works for the core magento website, some extension may or may not work, depending on how clean they were programmed, so it is preferable that you test and fix the PHP programming of the extensions yourself on a local server first before arranging downtime for the live store. But believe me its worth it. 

Furthermore, due to improvements in PHP even before7 came out, enabling compilation is no longer needed and sometimes slows down the website, but people like to keep it on ""just in case""

Another thing to look into is compressing/optimizing your images...What you can do is use JPEGOPTIM in the shell/SSH and recursively optimize or compress down to-% all of the images in the Magento folder. Dont use the image optimizing extensions on Magento Connect. Its a waste of money.

If you need to know how fast your website is loading and what you need to focus on fixing try using webpagetest.org on your website and act on the recommendations.

 

Another is to try to keep the number of extensions down and think if you really need some of them when you can just do a simple shell command and/or schedule it with cron during the night.

 Last option of course is to look at your server's compute resources and if you have the ability to, split the web server from the MySQL server to decrease the load of serving pages and processing database requests at the same time... This is what i would most definitely do in the future...

المزيد من الأسئلة المماثلة