Techniques to speed up Magento on a shared host

陌路散爱 提交于 2020-01-01 19:26:54

问题


I have an established Magento site that is only just starting to get complaints about its performance. It's on a shared server. The internal server-side cache is also enabled.

Some of the problems I have noticed are

  • Many HTTP Requests
  • No minification of CSS or JavaScript.
  • No CSS sprites
  • Shared server isn't recommended for Magento, or so I've read

Unfortunately, I can not get a dedicated host and I don't want to hack the codebase to minify all JS/CSS.

  • Is there any plugins that will minify CSS / JS?
  • Do you have any experience with speeding up Magento's performance?

回答1:


To minify css/js files try this extension Fooman Speedster

I created a similar topic on magento performance improvements here , the comments there may help you.




回答2:


CSS sprites and JS minification are good general techniques, but hacking them out of the default Magento installation makes them a less-than-stellar option. You're likely to get better performance for your effort by enabling expiration dates on your files (CSS/JS/images can be cached for a while, especially once you've finished development) and making sure that apache gzip's those files. This will reduce the size of your page loads on empty cache and reduce the number of HTTP requests on cached pages.

After that, (and also recommended on the other topic mentioned) I'd recommend looking at the use of a PHP bytecode cache such as xcache. Magento loads many PHP files on every request, so such a cache will lead to significant improvements in performance. Ask your shared host whether they offer any such cache.

Also, here's the Magento article on performance, which has some good suggestions: http://www.magentocommerce.com/blog/comments/performance-is-key-notes-on-magentos-performance/

Edit: Forgot to mention, block caching can significantly reduce the amount of time that Magento churns on a page, speeding up your page loads. Google magento block caching for some good resources.




回答3:


You can get a VPS for barely more than a standard shared host. Or better yet, get two VPS accounts and use one only for the database.

You're really limited with what you can do to speed up Magento on a shared host, because so many tweaks rely on server configuration (which you can do with a VPS).

Also, turn on every cache that you possibly can. See:

  • http://www.magentocommerce.com/blog/comments/performance-is-key-notes-on-magentos-performance/
  • http://www.yoast.com/magento-performance-hosting/



回答4:


I assume you already know this, but the bottom line is that Magento should NOT be run on shared hosting. It wasn't designed at all for it. It's like trying to run the latest Photoshop on a 7 year old computer.



来源:https://stackoverflow.com/questions/1858012/techniques-to-speed-up-magento-on-a-shared-host

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!