1. I need to know how to make My magento website faster because my website is very slow. I have good hosting also but I don't know why it is so slow.
  2. My website doesn't shows the www at the url

please tell me first how can we fix it?


3 Answers 3


Analyze your site’s speed with gtmetrix

GTmetrix gives you insight on how well your site loads and provides actionable recommendations on how to optimize it.

Take mentioned step by step over there your website will perform better.


Redirect non-www to www

1) Open the .htaccess file and locate the "RewriteEngine on" line and right after it add the following lines:

RewriteCond %{HTTP_HOST} ^wtlusa.com$ [NC]
RewriteRule ^(.*)$ http://www.wtlusa.com/$1 [R=301,L]

Once you do this, save the .htaccess file and log in to the Magento admin.

2)Go to the System > Configuration and from the left panel click the "Web" button.

Unfold the "Unsecured" set of options and change the "Base URL" option from http://wtlusa.com to http://www.wtlusa.com.

Save the changes and your Magento website will be running with www.wtlusa.com only!


1. Enable Flat Categories and Products

In Magento admin, (top menu) System > Configuration, (left nav) Catalog > Catalog, (main page) Frontend. Set “Use Flat Catalog Category” and “Use Flat Catalog Product” to “Yes“.

Attributes that apply to Categories and Products are stored in separate database tables depending on their dataypes. ‘Flattening’ will put all attributes in one table for Magento retrieve. This will have a positive impact on site speed especially if it has 1,000 or more products

2. Merge CSS and JS Files

In Magento admin, (top menu) System > Configuration, (left nav) Advanced > Developer, (main page) JavaScript Settings, CSS Settings. Set “Merge Javascript” Files and “Merge CSS” Files to “Yes”.

A Magento site can have many CSS and javascript files and there will be more that come with extensions and site customizations. Doing step #2 will combine all CSS and javascript into one file which will make each page load faster.

3. Enable Compilation

In Magento admin, (top menu) System > Tools > Compilation, click Enable. This will take all the active scripts in Magento’s core structure and bring them to the front for faster website speed.

If updates, code modifications, extension installations are needed, Compilation needs to be disabled first. If not, there will be errors.

4. Caching Magento

When all other settings are in place and the site is ready to go live, go to System > Cache Management. Select all items, set the Action dropdown to “Enable” then hit Submit

The above settings will help increase the performance of an average Magento website. Those who are accustomed to server administration can do more. There are caching extensions that can be incorporated within Magento’s configuration file and other server tricks to speed up Magento.

Add below code in your .htaccess file

<IfModule mod_expires.c>
 ExpiresActive on
 ExpiresDefault "access plus 1 year"

 ExpiresByType image/jpg "access 1 year"
 ExpiresByType image/jpeg "access 1 year"
 ExpiresByType image/gif "access 1 year"
 ExpiresByType image/png "access 1 year"
 ExpiresByType image/svg+xml "access plus 1 month"
 ExpiresByType text/css "access 1 month"
 ExpiresByType application/pdf "access 1 month"
 ExpiresByType application/x-javascript "access 1 month"
 ExpiresByType application/x-shockwave-flash "access 1 month"
 ExpiresByType image/x-icon "access 1 year"    
 ExpiresByType application/javascript "access plus 1 year"
 ExpiresByType font/truetype "access plus 1 month"
 ExpiresByType font/opentype "access plus 1 month"
 ExpiresByType application/x-font-woff   "access plus 1 month"   
 ExpiresByType application/vnd.ms-fontobject "access plus 1 month"

<ifModule mod_gzip.c>
  mod_gzip_on Yes
  mod_gzip_dechunk Yes
  mod_gzip_item_include file \.(html?|txt|css|js|php|pl|asp|html|woff)$
  mod_gzip_item_include handler ^cgi-script$
  mod_gzip_item_include mime ^text/.*
  mod_gzip_item_include mime ^application/x-javascript.*
  mod_gzip_item_exclude mime ^image/.*
  mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*

<IfModule mod_headers.c>
  Header set Connection keep-alive     
  <FilesMatch ".(js|css|xml|gz|html)$">
    Header append Vary: Accept-Encoding
  <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)(\.gz)?$">        
    Header unset ETag
    FileETag None

<IfModule mod_deflate.c>
  # Compress HTML, CSS, JavaScript, Text, XML and fonts
  AddOutputFilterByType DEFLATE application/javascript
  AddOutputFilterByType DEFLATE application/rss+xml
  AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
  AddOutputFilterByType DEFLATE application/x-font
  AddOutputFilterByType DEFLATE application/x-font-opentype
  AddOutputFilterByType DEFLATE application/x-font-otf
  AddOutputFilterByType DEFLATE application/x-font-truetype
  AddOutputFilterByType DEFLATE application/x-font-ttf
  AddOutputFilterByType DEFLATE application/x-javascript
  AddOutputFilterByType DEFLATE application/xhtml+xml
  AddOutputFilterByType DEFLATE application/xml
  AddOutputFilterByType DEFLATE font/opentype
  AddOutputFilterByType DEFLATE font/otf
  AddOutputFilterByType DEFLATE font/ttf
  AddOutputFilterByType DEFLATE image/svg+xml
  AddOutputFilterByType DEFLATE image/x-icon
  AddOutputFilterByType DEFLATE text/css
  AddOutputFilterByType DEFLATE text/html
  AddOutputFilterByType DEFLATE text/javascript
  AddOutputFilterByType DEFLATE text/plain
  AddOutputFilterByType DEFLATE text/xml

  # Remove browser bugs (only needed for really old browsers)
  BrowserMatch ^Mozilla/4 gzip-only-text/html
  BrowserMatch ^Mozilla/4\.0[678] no-gzip
  BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
  Header append Vary User-Agent

To make website faster

  1. Follow this url. this i get from MSE
  2. Follow Gtmetrix to get the website slowing details

To load website with www at url:

  1. Login to admin panel

  2. Goto system-->configuration-->general-->web-->secure and unsecure url's

  3. Edit url's with http://www.yourwebsite.com

Not the answer you're looking for? Browse other questions tagged or ask your own question.