title: How can I relocate my magento store's media directory?
body: <p>I would like to move the media directory in for my magento store to a different drive on the server.</p>
  
  <p>Looking at <code>app/etc/config.xml</code> I see an xml field:</p>
  
  <pre><code>&lt;config&gt;
      &lt;default&gt;
          &lt;filesystem&gt;
              &lt;media&gt;{{root_dir}}/media&lt;/media&gt;
          &lt;/filesystem&gt;
      &lt;/default&gt;
  &lt;/config&gt;
  </code></pre>
  
  <p>I would expect that I could change that value to the new directory's location and all would be good.</p>
  
  <p>However, looking at <code>code/core/Mage/Core/Model/Config/Options.php</code>, I see that the media directory is defined as <code>$root.DS.'media';</code> rather than from the xml config:</p>
  
  <pre><code>protected function _construct()
  {
      $appRoot= Mage::getRoot();
      $root   = dirname($appRoot);
  
      $this-&gt;_data['app_dir']     = $appRoot;
      $this-&gt;_data['base_dir']    = $root;
      $this-&gt;_data['code_dir']    = $appRoot.DS.'code';
      $this-&gt;_data['design_dir']  = $appRoot.DS.'design';
      $this-&gt;_data['etc_dir']     = $appRoot.DS.'etc';
      $this-&gt;_data['lib_dir']     = $root.DS.'lib';
      $this-&gt;_data['locale_dir']  = $appRoot.DS.'locale';
      $this-&gt;_data['media_dir']   = $root.DS.'media';
      $this-&gt;_data['skin_dir']    = $root.DS.'skin';
      $this-&gt;_data['var_dir']     = $this-&gt;getVarDir();
      $this-&gt;_data['tmp_dir']     = $this-&gt;_data['var_dir'].DS.'tmp';
      $this-&gt;_data['cache_dir']   = $this-&gt;_data['var_dir'].DS.'cache';
      $this-&gt;_data['log_dir']     = $this-&gt;_data['var_dir'].DS.'log';
      $this-&gt;_data['session_dir'] = $this-&gt;_data['var_dir'].DS.'session';
      $this-&gt;_data['upload_dir']  = $this-&gt;_data['media_dir'].DS.'upload';
      $this-&gt;_data['export_dir']  = $this-&gt;_data['var_dir'].DS.'export';
  }
  </code></pre>
  
  <p>Wouldn't this mean that any change I make to <code>config.xml</code> would have no effect on my actual configuration?</p>
  
  <p>I'm also aware that this directory will need to be web-accessable, and that I will need to configure the Base Media URL through the magento admin tools to point to this new directory.  I plan to set this new directory as a sub-domain, and set the Base Media URLs to this sub-domain.</p>
  
  <p>Does anyone have any experience with moving the media directory?</p>