我的网站是www.suresafety.com,它位于magento 1.9.2.0中。它在过去的1。5年里运作良好,但从最近2个月开始,它太慢了。其中有1400种产品。
速度洞察速度在1年之前是83。现在它是39,这对我们的电子商务并不好。
我已完成以下所有步骤:
1)结合CSS和JS文件 •在Magento Admin中,转到系统>配置>开发人员。 •在“Javascript设置”下,将“合并Javascript文件”更改为“是”。 •在“CSS设置”下,将“合并CSS文件”更改为“是”。 •清除缓存。
2)启用平面目录
•在Magento Admin中,转到系统>配置>目录。 •在“前端”下,将“使用平面目录类别”更改为“是”。 •在“前端”下,将“使用平面目录产品”更改为“是”。 (可选的) •清除缓存。
3)确保没有注释带有deflate压缩规则的部分以启用默认压缩规则。
## enable apache served files compression
## http://developer.yahoo.com/performance/rules.html#gzip
# Insert filter on all content
###SetOutputFilter DEFLATE
# Insert filter on selected content types only
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript
# Netscape 4.x has some problems...
BrowserMatch ^Mozilla/4 gzip-only-text/html
# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip
# MSIE masquerades as Netscape, but it is fine
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# Don't compress images
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
# Make sure proxies don't deliver the wrong content
#Header append Vary User-Agent env=!dont-vary
4)为图像添加到期时间,js,css(.htcaccess)
##for image test
<IfModule mod_expires.c>
ExpiresActive On<br/>
ExpiresByType image/jpg "access 1 year"<br/>
ExpiresByType image/jpeg "access 1 year"<br/>
ExpiresByType image/gif "access 1 year"<br/>
ExpiresByType image/png "access 1 year"<br/>
ExpiresByType text/css "access 1 month"<br/>
ExpiresByType text/html "access 1 month"<br/>
ExpiresByType application/pdf "access 1 month"<br/>
ExpiresByType text/x-javascript "access 1 month"<br/>
ExpiresByType application/x-shockwave-flash "access 1 month"<br/>
ExpiresByType image/x-icon "access 1 year"<br/>
ExpiresDefault "access 1 month"<br/>
</IfModule><br/>
5)Cpanel - &gt;优化网站 - &gt; tic on 2nd选项(压缩所有内容)
6)从页面见解(下)
下载优化的图像,css,js7)替换旧的。
答案 0 :(得分:1)
您已经应用的大部分内容,但您也可以应用以下几点: -
a-请安装以下扩展程序: -
https://github.com/GordonLesti/Lesti_Fpc
https://github.com/tinify/magento1-plugin
b- http://magento2x.com/optimize-magento-database-by-cleaning-log/
c-请改进您的服务器配置,例如将内存限制设置为1024M(可选)
d-安装&amp;使用Memcache / varnish cache(可选)
e-您可以使用专用服务器。
答案 1 :(得分:0)
答案 2 :(得分:0)
检查以下网址以获得速度优化:
https://www.keycdn.com/blog/speed-up-magento/
下面的数据库优化:
SET FOREIGN_KEY_CHECKS = 0;
ALTER TABLE log_url
AUTO_INCREMENT = 1;
ALTER TABLE log_url_info
AUTO_INCREMENT = 1;
ALTER TABLE log_visitor
AUTO_INCREMENT = 1;
ALTER TABLE log_visitor_info
AUTO_INCREMENT = 1;
ALTER TABLE report_event
AUTO_INCREMENT = 1;
ALTER TABLE report_viewed_product_index
AUTO_INCREMENT = 1;
ALTER TABLE sendfriend_log
AUTO_INCREMENT = 1;
SET FOREIGN_KEY_CHECKS = 1;