Site loading speed is very slow

First determine if it's front end rendering or the actual script execution that is slow. Check with the developer console in your browser for the Time To First Byte. This is how long the script take to process on the server

enter image description here

In the screenshot you can see it's quite low (200ms) so in this case the problem wouldn't be on the server but on front end. Now if it's over, let's say, a second you might want to optimize.

Before you slap on some boosters and extra caching which isn't a fix just a patch or band aid to hide the real issue try to figure out what exactly is slow. You can use several tools also for that.

Slow queries

Magento can be quite heavy on the database so turning on the Slow Query Log might be a good place to start. Check out this post on how to turn it on. The log will show you any query that takes longer than X seconds.

Profilers

Profilers help you gain insight into whats going on in your code. For Magento I would recommend starting with Aoe_Profiler. Just install it and turn it on. On the front end it'll give you an output like this:

enter image description here

Expand the results and check for large red blocks. Those are the actual times it took a certain part of the code to process. Look out for any 3rd party modules that are taking up a lot of time or memory.

Another great tool is Black fire. Since Aoe_Profiler is a module in Magento it doesn't show the underlying php processes and can crash on large installations with a lot of modules. Black fire runs on the server. With a hackathon we set up a Vagrant box with black fire you can use. Just put your project on there and fire it up. Check the Black fire site for more info how to use it.

Last one is probably my favorite: New Relic.

Unfortunately it's a paid service although they provide a free trial for pro accounts. After installing it on your server and connecting the profile wait a couple of hours for data to come in. Make sure there is some traffic on the shop tho.

enter image description here

New Relic also has a blog post on how to debug Magento which I can recommend. Also check out the ProxiBlue New Relic module for extra Magento data in New Relic.

Basically this will show you all of the above described features like slow queries, the processes in PHP etc and display it in easy graphs and tables. This should give you great insight in what is the issue in your installation.

And from here Now that you know what is causing the low performance you can move on to solving it. Check forums like this one or Google for the part or module of Magento that is slow. A lot of issues are well known and others have solved it before. Or, if you can't find a solution post your question here and include your findings in the question


Site speed optimization in Magento is very vast topic. This is one link which can help you,

http://www.gxjansen.com/blog/101-ways-to-speed-up-your-magento-e-commerce-website/

Taking a gist of it,

You need to concentrate on two aspects, 1. Frontend optimization 2. Backend optimization

Frontend optimization

  1. You can install Fooman Speedster - http://www.magentocommerce.com/magento-connect/speedster-by-fooman.html and enable css , js merge

  2. Enable Magento block caching in admin.

  3. Enable Gzip compression

Backend Optimization

  1. You can configure Varnish for full page caching

  2. Enable complication in backend.

  3. Enable flat structure for catalog (category and products)


Magento is a great e-commerce framework. It has tons of features and you can really build a scalable e-commerce platform. I used Magento in my latest project and faced this speed issue. After doing some research and modification I really sped up my website.

Server Optimization

  • Use Nginx as web server
  • Move MySQL to different server with master-slave replica. If you are on AWS use RDS for MySQL.
  • Optimize Nginx & Php-fpm
  • enable gzip compression
  • Enable Browser cache

Magento Settings

  • Disable all unnecessary extensions
  • Merge CSS and JavaScript files
  • Disable Log
  • Clean up Magento log tables
  • Enable External full page cache

Install Redis Cache, APC Opcode & Full Page Cache extension - Install PHP Accelerators - Install Redis cache for backend & session caching - Install Lesti FPC

Image Optimization & YSlow - on an average 56 percent of a website’s page weight is made up of images. Optimizing your product images can dramatically increase the speed of your pages as this decreases their download times. - Scan your website through gtmetrix or Pingdom and follow their optimization suggestions.

Use CDN

You can read details about this on my website: http://www.ranjeetvimal.com/tips-to-speed-up-magento-1-9-performance/