title: Magento - How to Manually Change Base URL / Domain?
body: <p>I've done searches for this, but can only find answers on how to do this through the admin panel (which I can't reach).</p>
  
  <p>I have a live Magento installation that I'm going to be doing some new development on.</p>
  
  <p>So I'm setting up a development site on a subdomain of the main site's url (<a href="http://test.mydomain.com" rel="nofollow noreferrer">http://test.mydomain.com</a>)</p>
  
  <p>The problem I'm having is that somewhere in the <code>Mage::run()</code> bootstrapper, the site's getting redirected to the www subdomain.</p>
  
  <p>I've changed the following 2 records in the DB:</p>
  
  <pre><code>mysql&gt; select * from core_config_data where value like '%mydomain.com%';
  | config_id | scope   | scope_id | path                   | value                         |
  +-----------+---------+----------+------------------------+-------------------------------+
  |         2 | default |        0 | web/unsecure/base_url  | http://test.mydomain.com/     |
  |         3 | default |        0 | web/secure/base_url    | http://test.mydomain.com/     |
  </code></pre>
  
  <ul>
  <li>I've also ensured that the 'local.xml' config is pointing to the new dev DB.</li>
  <li>I've also deleted the entire /var/cache</li>
  <li>I've also removed all htaccess subdomain redirects</li>
  <li>I've also restarted Apache.</li>
  </ul>
  
  <p>No luck, still redirecting.</p>
  
  <p>What am I missing?</p>