如何加快magento网站?
我的网站是www.suresafety.com,位于magento 1.9.2.0。从过去的一年半开始工作得很好,但从最近2个月来看,它太慢了。其中有1400种产品。如何加快magento网站?
它的速度洞察力在1年前是83。现在是39,这对我们的电子纪念不利。
我所做的这一切以下步骤:
1)联合CSS和JS文件 •在Magento管理,进入系统>配置>开发。 •在“Javascript设置”下,将“合并Javascript文件”更改为YES。 •在“CSS设置”下,将“合并CSS文件”更改为YES。 •清除缓存。
2)启用固定目录
•在Magento管理,进入系统>配置>目录。 •在“前端”下,将“使用平面目录类别”更改为YES。 •在“前端”下,将“使用平面目录产品”更改为YES。 (可选) •清除缓存。
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)交友 - >网站优化 - > tlc在第二个选项(压缩所有内容)
6)从页见解下载优化的图像,CSS,JS(底部)
7)更换机智旧的一个。
检查以下网址速度优化:
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;
你们中的大多数已经应用的东西,但你还可以申请以下几点: -
A-请安装以下扩展名: -
https://github.com/GordonLesti/Lesti_Fpc
https://github.com/tinify/magento1-plugin
B- http://magento2x.com/optimize-magento-database-by-cleaning-log/
c-请改善您的服务器配置eg- set Memory limi吨至1024M(可选)
D-安装&使用内存缓存/清漆缓存(可选)
E-你可以把专用的服务器。
由于Stack Overflow是一个[编程相关](http://*.com/help/on-topic)问答网站,因此我正在投票关闭此问题。你的问题不是关于编程。也许你应该在http://magento.stackexchange.com上发布它呢? – Enigmativity
通过https://tools.pingdom.com/查看您的网站。我已检查过您的网站,它需要50秒的加载时间,登录页面大小2.4MB,很多不必要的重定向和缺少图像文件路径。 – stalinrajindian