Magento-magento site optimization

Source: Internet
Author: User
Magento-magento site optimization (from csdn)

Magento's website is really too slow. I have thought of many methods, referred to a lot of information, and conducted many tests. I will summarize the general steps:

1. Compress JS and CSS code. If necessary, combine all CSS and JS into one file, compress and cache them.

2. Clear unnecessary comments in the magento template to slim down the images used

3. Optimize the magento code. This step requires a lot of work, but it may be a significant step, but the premise is that you are very familiar with magento, completely delete unused modules, and close useless blocks, clear invalid and useless XML (parsing XML is very expensive). Try not to call magento's image resize function in a large amount on a page, which consumes a lot of memory unless you optimize the code yourself.

4. MySQL configuration optimization: Make full use of your hardware resources. The following values must be adjusted based on your configuration.

Key_buffer_size = 512 m
Max_allowed_packet = 64 m
Table_cache = 512
Sort_buffer_size = 4 m
Net_buffer_length = 8 K
Read_buffer_size = 4 m
Read_rnd_buffer_size = 2 m
Myisam_sort_buffer_size = 64 m
Tmp_table_size = 128 m
Query_cache_size = 96 m
Query_cache_type = 1
Thread_cache_size = 8
Max_connections = 400
Wait_timeout = 300
5. Mount the VaR directory of magento to the memory to speed up reading, as shown in figure

Mount-T tmpfs-O size = 100 m, mode = 0777 tmpfs VaR

6. Install the PHP accelerator, such as APC, xcache, and eaccelerator. For the installation method, refer to related websites.

However, the root cause is that the biggest optimization comes from the optimization of templates, codes, and blocks.

Http://www.magentocommerce.com/blog/comments/performance-is-key-notes-on-magentos-performance/

Http://www.magentocommerce.com/blog/comments/understanding-magento-scalability-and-performance-1/

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.