title: Changing the root_dir on a magento system
body: <p>I want to create another instance of magento for development purposes.</p>
  
  <p>I've copied the site and the database and changed the connction string for the database.</p>
  
  <p>However, when I go to log in to magento it re-directs to the live site www.example.com rather than going to the test url test.example.com.</p>
  
  <p>Both instances exist on the same box.</p>
  
  <p>After a bit of digging arund I think I need to change the root_dir, but not sure where to change this.</p>
  
  <p>Can anyone help?</p>
  
  <p>Thanks
  Tom</p>
  
  <p>-- Edit --</p>
  
  <p>I've updated the two fields in question in the database, but all urls still point to the production environment.</p>
  
  <p>Do I have to run a specific script to update all of these across the whole site?</p>
  
  <p>-- Edit 2 --</p>
  
  <p>There was more than one instance of the two urls in the table, after updating these and deleting the cache and sessions directories from the var folder everything worked.</p>