<?xml version="1.0" encoding="utf-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
xmlns:media="http://search.yahoo.com/mrss/"><channel><title>Yoast &#187; Magento</title> <atom:link href="http://yoast.com/cat/magento/feed/" rel="self" type="application/rss+xml" /><link>http://yoast.com</link> <description>Tweaking Websites</description> <lastBuildDate>Mon, 21 May 2012 18:33:54 +0000</lastBuildDate> <language>en-US</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.4-beta4-20825</generator> <image><title>Yoast</title> <url>http://yoast.com/wp-content/themes/yoast-v2/images/yoast-logo-rss.png</url><link>http://yoast.com</link> <width>144</width> <height>103</height> <description>Tweaking Websites</description> </image> <item><title>hreview and hproduct in Magento</title><link>http://yoast.com/rich-snippets-magento/#utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rich-snippets-magento</link> <comments>http://yoast.com/rich-snippets-magento/#comments</comments> <pubDate>Wed, 26 May 2010 15:01:57 +0000</pubDate> <dc:creator>Joost de Valk</dc:creator> <category><![CDATA[Magento]]></category> <category><![CDATA[Microformats]]></category> <category><![CDATA[Rich Snippets]]></category><guid
isPermaLink="false">http://yoast.com/?p=2302</guid> <description><![CDATA[<p>Today I gave a presentation at Meet Magento in the Netherlands, talking about SEO for Magento. Up until this point, all articles about that subject here on Yoast have been written by my colleague Joachim Houtman. Last week though, I started playing with Magento myself, in preparation for this presentation today, and I've added some [...]</p><p><a
href="http://yoast.com/rich-snippets-magento/">hreview and hproduct in Magento</a> is a post by <a
rel="author" href="http://yoast.com/author/joost/">Joost de Valk</a> on <a
href="http://yoast.com">Yoast - Tweaking Websites</a>.A good WordPress blog needs good hosting, you don't want your blog to be slow, or, even worse, down, do you? Check out my thoughts on <a
href="http://yoast.com/wordpress-hosting/">WordPress hosting</a>!</p>]]></description> <content:encoded><![CDATA[<p>Today I gave a presentation at <a
href="http://www.meet-magento.nl/">Meet Magento</a> in the Netherlands, talking about SEO for Magento. Up until this point, all articles about that subject here on Yoast have been written by my colleague <a
href="http://yoast.com/author/joachim/">Joachim Houtman</a>. Last week though, I started playing with Magento myself, in preparation for this presentation today, and I've added some things to our <a
href="http://yoast.com/articles/magento-seo/#seotemplate">Blank SEO Template</a> that I know some of you will enjoy.</p><p>What I've done is I've added both <code>hreview</code> and <code>hproduct</code> microformats to our template. I'll briefly walk you through how to do that. It might be wise to start with Frederick's post on <a
href="http://yoast.com/google-microformats-conversion-rate-optimization-serps/">Driving more traffic from Google through Microformats</a>. After that you can read my own post on how to implement <a
href="http://yoast.com/implement-hreview-wordpress-theme/">hreview in WordPress</a> or read on to see how to implement hreview-aggregate in Magento.</p><h2 id="hreview">Adding hreview in 5 steps</h2><h3 id="hreview-wrapper">Step 1: the 'hreview-aggregate' class</h3><p>Because we've got more than one review for products, we're going to be using the <code>hreview-aggregate</code> version of the microformat. This wrapper class should be on an element that contains all the elements of the review. So we open:</p><pre class="brush: plain; light: true; title: ; notranslate">template/catalog/product/view.html</pre><p>And add the class <code>hreview-aggregate</code> to the <code>product-shop</code> div.</p><h3 id="item">Step 2: the "item" reviewed</h3><p>The second thing we should add is the item being reviewed, we'll use two classes here: <code>item</code> and <code>fn</code>. I've added this to the &lt;h1&gt; within the product-name class, still in the same file. So far, what we've got looks like this:</p><pre class="brush: php; html-script: true; title: ; notranslate">&lt;div class=&quot;product-shop hreview-aggregate&quot;&gt;
  &lt;div class=&quot;product-name&quot;&gt;
    &lt;h1 class=&quot;item name fn&quot;&gt;
      &lt;?php echo $_helper-&gt;productAttribute($_product, 
          $_product-&gt;getName(), 
          'name') 
    ?&gt;
    &lt;/h1&gt;
  &lt;/div&gt;</pre><h3 id="rating">Step 3: the rating</h3><p>Then you'll see a call like this:</p><pre class="brush: php; light: true; title: ; notranslate">&lt;?php echo $this-&gt;getReviewsSummaryHtml($_product, false, true)?&gt;</pre><p>This calls to a template file that's hidden in:</p><pre class="brush: plain; title: ; notranslate">&lt;strong&gt;/template/review/helper/summary.phtml&lt;/strong&gt;</pre><p>If you open this file you'll see a div called <code>rating-box</code>, containing a div called <code>rating</code>. Because this box outputs the rating visually using CSS, we'll need to make it machine readable as well. Luckily, there's a solution for that: we'll use the <code>value-title</code> method. Within the contents of the div with class <code>rating</code>, we'll add this:</p><pre class="brush: php; html-script: true; title: ; notranslate">&lt;span 
  class=&quot;value-title&quot; 
  title=&quot;&lt;?php echo number_format($this-&gt;getRatingSummary() / 20,1); ?&gt;&quot;&gt;
&lt;/span&gt;</pre><p>As you can see, we retrieve the rating and turn it into a 5 point scale rating by dividing it by 20, so Google can understand it.</p><h3 id="count">Step 4: the review count.</h3><p>Next we have to tell Google how many reviews we've had for this product. In a span in the same file with the class <code>amount</code>, you'll find this info. I had to redo the code a tiny bit, it ended up looking like this (formatted for readability):</p><pre class="brush: php; html-script: true; title: ; notranslate">&lt;?php 
  echo '&lt;span class=&quot;count&quot;&gt;';
  echo $this-&gt;getReviewsCount();
  echo '&lt;/span&gt;'.$this-&gt;__(' Review(s)'); 
?&gt;</pre><p>So with the span <code>count</code> it only shows the number, the text "Review(s)" is actually outside of it. Otherwise Google wouldn't understand it.</p><h3 id="pricerange">Step 5: The pricerange</h3><p>This last step actually caused me a bit more headaches, even though the end result is quite simple. We need to add the <code>pricerange</code> class to our price "tag", in order for Google to understand the pricing of our product. To do this, we open up:</p><pre class="brush: plain; light: true; title: ; notranslate">/template/catalog/product/price.phtml</pre><p>This is one big file, but don't get scared: there are two divs there with class <code>price-box</code>, just add the <code>pricerange</code> class there and you'll be ok, and quickly close that file before that code get's to your head!</p><h2 id="hproduct">Adding hproduct to your template</h2><h3 id="hproduct-wrap">Step 1: The hproduct class</h3><p>Open up view.phtml again:</p><pre class="brush: plain; light: true; title: ; notranslate">/template/catalog/product/view.phtml</pre><p>The <code>hproduct</code> class needs to go up in the source a bit higher than the <code>hreview</code> class, easiest way is to add it to the div with class <code>product-view</code>.</p><h3 id="availability">Step 2: Availability</h3><p>The <code>fn</code> is already there because of our hreview implementation, so we can go right to <code>availability</code>. To add the proper classing open up:</p><pre class="brush: plain; light: true; title: ; notranslate">/template/catalog/product/view/type/simple.phtml</pre><p>You'll see that the class in there is already called <code>availability</code>. It's there twice: for in stock and out of stock occasions. The full code I made out of that uses the <code>value-title</code> method, and looks like this:</p><pre class="brush: php; html-script: true; title: ; notranslate">&lt;?php if($_product-&gt;isSaleable()): ?&gt;
    &lt;p class=&quot;availability in-stock&quot;&gt;
    &lt;?php echo $this-&gt;__('Availability:') ?&gt; 
    &lt;span class=&quot;value-title&quot; title=&quot;&lt;?php echo $this-&gt;__('In stock') ?&gt;&quot;&gt;
      &lt;?php echo $this-&gt;__('In stock') ?&gt;
    &lt;/span&gt;
  &lt;/p&gt;
&lt;?php else: ?&gt;
    &lt;p class=&quot;availability out-of-stock&quot;&gt;
    &lt;?php echo $this-&gt;__('Availability:') ?&gt;
    &lt;span class=&quot;value-title&quot; title=&quot;&lt;?php echo $this-&gt;__('Out of stock') ?&gt;&quot;&gt;
      &lt;?php echo $this-&gt;__('Out of stock') ?&gt;
    &lt;/span&gt;
  &lt;/p&gt;
&lt;?php endif; ?&gt;</pre><p>Now I'll be honest: I have second thoughts about giving Google availability data for products. If Google were to act in the best interest of it's endusers, it would <em>not</em> show you in the rankings for a particular product when there were other sites that carried the same product that indicated they do have stock. So, use this part of hproduct with some prejudice.</p><h3 id="photo">Step 3: The product photo</h3><p>Next up is the product photo. Open up:</p><pre class="brush: plain; light: true; title: ; notranslate">/template/catalog/product/view/media.phtml</pre><p>You'll see an <code>img</code> element with the id <code>image</code>, give it two classes: <code>photo</code> and <code>fn</code>. Some microformats parsers might have issues with using the fn from the <code>hreview</code>, and since this image contains the exact same title as an alt tag, adding the <code>fn</code> class here will help those parsers.</p><h3 id="price">Step 4: Price</h3><p>This step is easy: the default theme already has the class <code>price</code> around the price everywhere, so just leave it as is and you're good, otherwise, open up <em>price.phtml</em> and add it in.</p><h3 id="brand">Step 5: Brand</h3><p>The last step to our <code>hproduct</code> completion is to add the brand. Open up:</p><pre class="brush: plain; light: true; title: ; notranslate">/template/catalog/product/view/attributes.phtml</pre><p>We'll use the fact that brand is an internal attribute name in Magento as well for this. Where it has a <code>td</code> with class <code>data</code>, change it into this:</p><pre class="brush: php; light: true; title: ; notranslate">&lt;td class=&quot;data &lt;?php echo strtolower($_data['label']); ?&gt;&quot;&gt;</pre><p>By doing this all the data cells will have a proper class name, one of which will be <code>brand</code>, completing our <code>hproduct</code> microformat!</p><h2 id="presentation">My presentation from Meet Magento</h2> <iframe
src="http://www.slideshare.net/slideshow/embed_code/4317221" width="580" height="473" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe><br/><br/><h2 id="summary">Microformats in Magento</h2><p>So if you've followed the steps above, you should now have a nicely microformatted product page. Use <a
href="http://www.google.com/webmasters/tools/richsnippets">Google's Rich Snippets testing tool</a> to test it, and have a lot of fun using it!</p><h2 id="download">Downloading the updated template</h2><p>You can <a
href="http://www.magentocommerce.com/magento-connect/Yoast/extension/974/yoast-blank-seo-theme">download the updated template from Magento Connect</a>.</p><p><a
href="http://yoast.com/rich-snippets-magento/">hreview and hproduct in Magento</a> is a post by <a
rel="author" href="http://yoast.com/author/joost/">Joost de Valk</a> on <a
href="http://yoast.com">Yoast - Tweaking Websites</a>.A good WordPress blog needs good hosting, you don't want your blog to be slow, or, even worse, down, do you? Check out my thoughts on <a
href="http://yoast.com/wordpress-hosting/">WordPress hosting</a>!</p>]]></content:encoded> <wfw:commentRss>http://yoast.com/rich-snippets-magento/feed/</wfw:commentRss> <slash:comments>24</slash:comments> </item> <item><title>Landing pages module for Magento</title><link>http://yoast.com/landing-pages-module-magento/#utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=landing-pages-module-magento</link> <comments>http://yoast.com/landing-pages-module-magento/#comments</comments> <pubDate>Tue, 08 Sep 2009 08:23:11 +0000</pubDate> <dc:creator>Joachim Houtman</dc:creator> <category><![CDATA[Magento]]></category><guid
isPermaLink="false">http://yoast.com/?p=1581</guid> <description><![CDATA[<p>One of the most powerful features of Magento is it flexibility. With the CMS functionality you are able to create very SEO friendly static pages in an easy way. There's one issue though: by default Magento lacks a good way of including a group of products on a page if they are not all products [...]</p><p><a
href="http://yoast.com/landing-pages-module-magento/">Landing pages module for Magento</a> is a post by <a
rel="author" href="http://yoast.com/author/joachim/">Joachim Houtman</a> on <a
href="http://yoast.com">Yoast - Tweaking Websites</a>.A good WordPress blog needs good hosting, you don't want your blog to be slow, or, even worse, down, do you? Check out my thoughts on <a
href="http://yoast.com/wordpress-hosting/">WordPress hosting</a>!</p>]]></description> <content:encoded><![CDATA[<p>One of the most powerful features of Magento is it flexibility. With the CMS functionality you are able to create very SEO friendly static pages in an easy way. There's one issue though: by default Magento lacks a good way of including a group of products on a page if they are not all products from one single category.</p><p>You can include some dynamic content, e.g. all products from one category. Just add the following block to your CMS page to show all products from the category with ID 8 on a static landing page:</p><pre class="brush: php; title: ; notranslate">{{block type=&quot;catalog/product_list&quot; 
    name=&quot;product_listing&quot; 
    template=&quot;catalog/product/list.phtml&quot; 
    category_id=&quot;8&quot; }}</pre><p>Now wouldn't it be great if you could also filter the products on attribute value? For instance to show all black cell phones on a static page? Well, now you can! With this new Magento landing page module you will be able to do this in a very easy way. Just <a
href="#download">download the module</a> and copy it to the root of your Magento install. After this you will be able to show all black cell phones (this example is using the Magento sample data) by simply adding this block to your CMS page:</p><pre class="brush: php; title: ; notranslate">{{block type=&quot;Yoast_Filter/Result&quot; 
    name=&quot;filter_result&quot; 
    template=&quot;catalog/product/list.phtml&quot;  
    attribute_name=&quot;color&quot; 
    value=&quot;24&quot; 
    category=&quot;8&quot; }}</pre><p>Go to your newly created CMS page and you will see a page with all black cell phones. Now it is time to optimize your landing page with some good unique content, a nice title, search engine friendly url, some header tags and you will have a <em>very</em> seo friendly Magento landing page. In the same way you can filter all products on attribute value and/or category. So for a optimized landing page for all Apple Computers just create something like this example:</p><div
id="attachment_1590" class="wp-caption alignnone" style="width: 310px"><a
href="http://cdn2.yoast.com/wp-content/uploads/2009/09/Magento-landing-pages.png"><img
src="http://cdn.yoast.com/wp-content/uploads/2009/09/Magento-landing-pages-300x225.png" alt="Example of the Magento Landing Pages module, click for larger version." title="Magento-landing-pages" width="300" height="225" class="size-medium wp-image-1590" /></a><p
class="wp-caption-text">Example of the Magento Landing Pages module, click for larger version.</p></div><h2>Dynamic attribute filter pages</h2><p>Well designed pages created by hand with unique content will outperform dynamic generated ones, but it is a hell of a job to create 10k landing pages. So another great feature would be the option to create dynamic pages for each value of an attribute. After the installation of the module and the Magento demo data installed you can go to <code>yourmagentoshop.com/f/color/24/</code> and you will get all black products on one page.</p><p>As you can see the url start with <code>/f</code> for calling the module name, <code>/color</code> is the attribute name and <code>/24</code> is the value of the attribute. For drop-down and multi-select attributes this is a number (the ID of the attribute value), for text attributes it's the textvalue. An example URL of a text attribute for the Magento demo data would be <code>yourmagentoshop.com/f/country_orgin/italy/</code>.</p><h2>Extending your Landing Page with static content</h2><p>A page without content isn't very SEO friendly. The Magento CMS uses static blocks for text blocks. When you create a block with the identifier <code>landing-$attribute-$value</code> this block will be added to the above the product listing. So for the example above you should create a static block with the identifier <code>landing-color-24</code> and voila, the static block is added to the page <code>yourmagentoshop.com/f/color/24/</code>.</p><h2>Example Magento Landing Page</h2><p>So by now you'll want to see an example. Well we've got one for you, though it's Dutch. We work with a Dutch childrens book site called <a
href="http://www.topkinderboek.nl/">Top Kinderboek</a> of which all proceeds go to charities, and have used this feature to create author pages there. So check out this example: all books by <a
href="http://www.topkinderboek.nl/f/auteur/Paul-Biegel.html">Paul Biegel</a>.</p><h2>Layered Navigation for landing pages</h2><p><strong>Update 11-1-2010</strong> Now it is even possible to add layered navigation to the landing pages. By default this is enabled for the dynamic pages, you can change this by editing the filter.xml. For the CMS pages you should add something like the following code to the XML update (note the setAttributeName and setValue):</p><pre class="brush: php; title: ; notranslate">
&lt;reference name=&quot;content&quot;&gt; 
&lt;block type=&quot;Yoast_Filter/Result&quot; name=&quot;filter_result&quot; template=&quot;catalog/product/list.phtml&quot;&gt;
&lt;action method=&quot;setAttributeName&quot;&gt;&lt;attribute_name&gt;color&lt;/attribute_name&gt;&lt;/action&gt;
&lt;action method=&quot;setValue&quot;&gt;&lt;value&gt;24&lt;/value&gt;&lt;/action&gt;
&lt;/block&gt;
&lt;block type=&quot;catalog/product_list_toolbar&quot; name=&quot;product_list_toolbar&quot; template=&quot;catalog/product/list/toolbar.phtml&quot;&gt;
&lt;block type=&quot;page/html_pager&quot; name=&quot;product_list_toolbar_pager&quot; template=&quot;page/html/pager.phtml&quot; /&gt;  
&lt;/block&gt;
 &lt;action method=&quot;setToolbarBlockName&quot;&gt;&lt;name&gt;product_list_toolbar&lt;/name&gt;&lt;/action&gt;
&lt;/reference&gt;
&lt;reference name=&quot;left&quot;&gt;
&lt;block type=&quot;Yoast_Filter/Layer_View&quot; name=&quot;catalog.leftnav&quot; before=&quot;-&quot; template=&quot;catalog/layer/view.phtml&quot;/&gt;
&lt;/reference&gt;
</pre><h2 id="download">Downloads</h2><p>So you were probably wondering by now, but <a
href="http://cdn.yoast.com/wp-content/uploads/2010/11/landing_pages.zip" rel="nofollow">You can download the module right here</a> or install it through <a
href="http://www.magentocommerce.com/magento-connect/Yoast/extension/1915/yoast-landing-pages" rel="nofollow">MagentoConnect</a>.</p><h2>Need help?</h2><p>Of course, if you want to use this Landing Page module in your Magento install and would like us to help set it up, use the <a
href="http://yoast.com/hire-me/">hire me form</a> and let us know!</p><p><a
href="http://yoast.com/landing-pages-module-magento/">Landing pages module for Magento</a> is a post by <a
rel="author" href="http://yoast.com/author/joachim/">Joachim Houtman</a> on <a
href="http://yoast.com">Yoast - Tweaking Websites</a>.A good WordPress blog needs good hosting, you don't want your blog to be slow, or, even worse, down, do you? Check out my thoughts on <a
href="http://yoast.com/wordpress-hosting/">WordPress hosting</a>!</p>]]></content:encoded> <wfw:commentRss>http://yoast.com/landing-pages-module-magento/feed/</wfw:commentRss> <slash:comments>59</slash:comments> <media:thumbnail url="http://cdn3.yoast.com/wp-content/uploads/2009/09/Magento-landing-pages-125x125.png" /> <media:content url="http://cdn2.yoast.com/wp-content/uploads/2009/09/Magento-landing-pages.png" medium="image"> <media:title type="html">Magento-landing-pages</media:title> <media:description type="html">Example of the Magento Landing Pages module, click for larger version.</media:description> <media:thumbnail url="http://cdn3.yoast.com/wp-content/uploads/2009/09/Magento-landing-pages-125x125.png" /> </media:content> </item> <item><title>Magento performance hosting</title><link>http://yoast.com/magento-performance-hosting/#utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=magento-performance-hosting</link> <comments>http://yoast.com/magento-performance-hosting/#comments</comments> <pubDate>Fri, 12 Jun 2009 07:40:54 +0000</pubDate> <dc:creator>Joachim Houtman</dc:creator> <category><![CDATA[Magento]]></category> <category><![CDATA[Apache]]></category> <category><![CDATA[Hosting]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Site Speed]]></category><guid
isPermaLink="false">http://yoast.com/?p=1489</guid> <description><![CDATA[<p>The system requirements of Magento are quite extensive, it requires at least PHP 5.2.0 extended with mcrypt, PDO_MySql and simplexml. For the database Magento needs at least MySQL 4.1.20 with InnoDB storage engine. At MagentoCommerce.com you can find a complete list of requirements. But how do you know if your server meets these system requirements? [...]</p><p><a
href="http://yoast.com/magento-performance-hosting/">Magento performance hosting</a> is a post by <a
rel="author" href="http://yoast.com/author/joachim/">Joachim Houtman</a> on <a
href="http://yoast.com">Yoast - Tweaking Websites</a>.A good WordPress blog needs good hosting, you don't want your blog to be slow, or, even worse, down, do you? Check out my thoughts on <a
href="http://yoast.com/wordpress-hosting/">WordPress hosting</a>!</p>]]></description> <content:encoded><![CDATA[<p>The system requirements of Magento are quite extensive, it requires at least PHP 5.2.0 extended with mcrypt, PDO_MySql and simplexml. For the database Magento needs at least MySQL 4.1.20 with InnoDB storage engine. At <a
href="http://www.magentocommerce.com/system-requirements">MagentoCommerce.com</a> you can find a complete list of requirements. But how do you know if your server meets these system requirements? <a
href="http://www.magentocommerce.com/knowledge-base/entry/how-do-i-know-if-my-server-is-compatible-with-magento">Check this</a> and follow these three steps.</p><h2>How to get the most out your Magento install?</h2><p>Magento is notorious for it speed and performance. But isn't necessary to have a killer web server to get very reasonable performance, it is all about the configuration of your server and the code of your template. However, after the 1.3 release there are some performance improvements, like <a
href="http://www.magentocommerce.com/blog/comments/magento-version-130-is-now-available/">Frontend Flat Catalog</a>, and people measure reduction of loading times up to 40%. Another recent development is the <a
href="http://www.magentocommerce.com/extension/1359/magento-compiler">Magento Compiler this module</a> compiles all Magento files. From tests this module gave between 25% to 50% better performance. This module is still in beta and should not be used in a production environment for now.</p><p>The question is, what else can you do to speed up your Magento install?</p><h4>Optimize your template for speed</h4><p>More information can be found at the <a
href="http://yoast.com/articles/magento-seo/#speed">Magento SEO</a> article.</p><h4>Enable compression of your files</h4><p>Mod_deflate allows output from your server to be compressed. To enable it for Magento edit your .htaccess, around line 74, in Magento root directory.</p><pre class="brush: plain; title: ; notranslate">&lt;ifmodule mod_deflate.c&gt;
############################################
## 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
&lt;/ifmodule&gt;</pre><h4>Apache Module mod_expires</h4><p>mod_expires controls the setting of the Expires HTTP header and the max-age directive of the Cache-Control HTTP header in server responses. To enable Expires HTTP header for Magento you had to change the code underat your .htaccess to.</p><pre class="brush: plain; title: ; notranslate">&lt;ifmodule mod_expires.c&gt;
ExpiresActive On
ExpiresDefault &quot;access plus 1 month&quot;
&lt;/ifmodule&gt;</pre><h4>Use PHP Accelerator</h4><p>Install a PHP opcode cacher such as <a
href="http://www.magentocommerce.com/boards/viewthread/9882/">APC</a> or <a
href="http://xcache.lighttpd.net/">XCache</a>. This seems to deliver rather large improvement in the responsive of the Magento install. Some people note a reduce of loading time up to 70%.</p><h4>Tune your MySQL configuration</h4><p>You can modify the configuration of the MySQL server to take advantage of the server's RAM. The efficiency of this step are different, it seems to depends mainly on the number of products. When you have only 100 products, difference will be hardly to notice (below 100ms). But for shops with over 50.000 products there is a huge reduction of the loading time. To give an idea about the settings, for shops with only a limit number of products a query_cache_limit of 1MB will be enough. For larger stores the optimal query cache value can be 64MB. To get the optimal value you really need some testing. A good start point for your <a
href="http://dev.mysql.com/doc/refman/5.0/en/query-cache-configuration.html">Query Cache configuration</a> can be found here.</p><h4>Speed up your Cache files</h4><p>Magento makes extensive use of file-based storage for caching and session storage. The slowest component in a server is the hard drive, so if you use a memory-based file system such as tmpfs, you can save all those extra disk IO cycles by storing these temporary files in memory instead of storing them on your slow hard drive.</p><h5>Let´s do this with tmpfs</h5><p>Let's say your Magento install is at <code>/var/www/domain.com/</code> so your cache and session directories are <code>/var/www/domain.com/var/cache/</code> and <code>/var/www/domain.com/var/session/</code> For cache we will allocate a max of 256MB RAM and for sessions 64MB RAM. It is important to give access to everyone (e.g your webserver Apache)</p><pre class="brush: plain; title: ; notranslate">mount -t tmpfs -o size=256M,mode=0744 tmpfs /var/www/domain.com/var/cache/
mount -t tmpfs -o size=64M,mode=0744 tmpfs /var/www/domain.com/var/session/</pre><p>Now it might be a good idea to restore these volumes each time your server boots. Just add the following lines to your <code>/etc/fstab</code>:</p><pre class="brush: plain; title: ; notranslate">tmpfs /var/www/domain.com/var/cache/ tmpfs size=256,mode=0744 0 0
tmpfs /var/www/domain.com/var/session/ tmpfs size=64,mode=0744 0 0</pre><p>Please note, your tmpfs is temporary in the sense that nothing will be created on your hard drive. If you reboot, everything in tmpfs will be lost.</p><h5>Save the sessions in your database</h5><p>Another option for the sessions is to save them in your database. Magento supports this very well and it is one small step to make this work. Just edit <code>app/etc/local.xml</code>and set</p><pre class="brush: plain; title: ; notranslate">&lt;session_save&gt;&lt;![CDATA[files]]&gt;&lt;/session_save&gt;</pre><p>to</p><pre class="brush: plain; title: ; notranslate">&lt;session_save&gt;&lt;![CDATA[db]]&gt;&lt;/session_save&gt;</pre><p>it will then save all sessions in the database which is a much quicker access than the filesystem. When you use a cluster enviroment you had to use this option.</p><h4>Enable Apache KeepAlives</h4><p>Enable Apache KeepAlives, this allows persistent connections. These long-lived HTTP sessions allow multiple requests to be send over the same TCP connection, this can result in an almost 50% speedup in latency times for HTML documents with lots of images. An example setting can be:</p><pre class="brush: plain; title: ; notranslate">KeepAlive On
KeepAliveTimeout 2</pre><h3>Need more Magento Performance?</h3><p>Ok, you are a very successful online retailer and it is time to cluster, no problem. This means that one single-server doesn't have enough power to keep your customers happy and so you need a clustered environment with two or more servers. A first step can be to start using a Content Delivery Network (CDN).</p><p>The most easy to start is using an separate media server, e.g. media.domain.com. Magento has native support for this. You can configure 'Base Media URL' secure and unsecure under web configurations. This allow you to serve media form one server without the needs to synchronize any directory. Another option is to start using a Content Delivery Network (CDN) for delivering the static files like images. <a
class="aff clicky_log_outbound" href="http://yoast.com/out/maxcdn/">MaxCDN</a> has some options for Magento that are quite nice.</p><p>Another option is to use more than one database servers this tactic is called "database replication". One database will be the "master" and all others will be called "slaves". The master is the only database that accepts any sort of write-base queries. These write queries are then replicated to any of the slave servers in real-time. A post at the <a
href="http://www.magentocommerce.com/blog/comments/performance-is-key-notes-on-magentos-performance/">Magento blog</a> will get you on the right track.</p><h4>To summarize, 5 quick wins</h4><ul><li>move the the rules in the .htaccess files from the directories to <a
href="http://www.magentocommerce.com/boards/viewthread/36225/P0/#i9/">virtualhost configuration directives</a></li><li>install Xcache or APC PHP cache accelerator</li><li>clean up your template and layout</li><li>make sure Apache KeepAlives is enabled</li><li>use a memory-based file system for Magento's <code>var/cache/</code> and <code>var/session/</code> directory</li></ul><h3>Conclusion</h3><p>This article give a introduction how to improve your Magento site performance, none of these tips are revolutionary. Because every website's scenario is different, when you really want to get the most out of your Magento install you need to hire a professional. The only way to discover the optimal server configuration is testing, a really great tool to use is <a
href="http://browsermob.com/load-testing">Browsermob</a>, load testing with real web browsers so you will able to put even the Magento checkout process under load testing.</p><p>Now, all of the above you can’t do on your average host, you need a VPS that provides you full control of your server environment. Check out WestHost’s sister company, <a
href="http://yoast.com/out/vpsnet">VPS.net</a>, for a VPS environment that would give you full control.</p><p><a
href="http://yoast.com/magento-performance-hosting/">Magento performance hosting</a> is a post by <a
rel="author" href="http://yoast.com/author/joachim/">Joachim Houtman</a> on <a
href="http://yoast.com">Yoast - Tweaking Websites</a>.A good WordPress blog needs good hosting, you don't want your blog to be slow, or, even worse, down, do you? Check out my thoughts on <a
href="http://yoast.com/wordpress-hosting/">WordPress hosting</a>!</p>]]></content:encoded> <wfw:commentRss>http://yoast.com/magento-performance-hosting/feed/</wfw:commentRss> <slash:comments>39</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using apc
Page Caching using apc
Database Caching 4/11 queries in 0.030 seconds using apc
Object Caching 921/927 objects using apc
Content Delivery Network via cdn.yoast.com

Served from: yoast.com @ 2012-05-23 16:53:19 -->
