2017-11-18 183 views
0

我的網站是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)更換機智舊的一個。

+0

由於Stack Overflow是一個[編程相關](http://stackoverflow.com/help/on-topic)問答網站,因此我正在投票關閉此問題。你的問題不是關於編程。也許你應該在http://magento.stackexchange.com上發佈它呢? – Enigmativity

+0

通過https://tools.pingdom.com/查看您的網站。我已檢查過您的網站,它需要50秒的加載時間,登錄頁面大小2.4MB,很多不必要的重定向和缺少圖像文件路徑。 – stalinrajindian

回答

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;