mysql - 如何提高 magento 网站的速度

标签 mysql performance .htaccess magento

我使用了一些技巧,例如磁力捕捉功能、禁用未使用的模块、合并 css 和 javascript、禁用系统日志。

所以请告诉我我还能做些什么来提高速度。

最佳答案

.htaccess 文件中有设置

<ifmodule mod_deflate.c>
############################################
## enable apache served files compression
## http://developer.yahoo.com/performance/rules.html#gzip
# Insert filter
SetOutputFilter DEFLATE
# 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
</ifmodule>

<IfModule mod_headers.c>
   Header set Connection keep-alive
</IfModule>

## EXPIRES CACHING ##
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/pdf "access plus 1 month"
ExpiresByType text/x-javascript "access plus 1 month"
ExpiresByType application/x-shockwave-flash "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresDefault "access plus 1 year"
</IfModule>
## EXPIRES CACHING ##

FileETag none
Header unset Cookie  
Header unset Set-Cookie

<FilesMatch "!\.(gif|jpe?g|png)$">
    php_value session.cookie_domain example.com
</FilesMatch>

我想这对你有帮助

关于mysql - 如何提高 magento 网站的速度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24013428/

相关文章:

php - 从网址中删除/重定向index.php以防止重复的网址

sql - 将排列转换为行组合的左连接条件

如果没有结果,mysqldump 避免创建文件

multithreading - 协程如何比线程更快?

c++ - 提高 mmap memcpy 文件读取性能

.htaccess - 使用 htaccess 将链接(SEO 模式)转换为 Yii 路由链接

mysql - 如何在 MySQL 中使用 LAST_INSERT_ID 关键字传递表名?

mysql - 使用 REGEX 代替 BETWEEN 运算符进行 SQL 搜索

java - Java 和 Python 之间不可变字符串连接的性能比较

php - .htaccess auto_prepend_file 如果 url 包含