Answers.Body: <p>You should edit the civicrm.settings.php file.  The location of this file depends on your content management system.</p>
  
  <p>Drupal: <code>sites/default/civicrm.settings.php</code></p>
  
  <p>WordPress: <code>wp-content/uploads/civicrm/civicrm.settings.php</code></p>
  
  <p>Joomla: <code>administrator/components/com_civicrm/civicrm.settings.php</code></p>
  
  <p>You may find this related post helpful: <a href="https://civicrm.stackexchange.com/questions/3503/how-do-i-change-the-civicrm-database-name">How do I change the CiviCRM Database name</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-03-23T08:57:26.920Z
Answers.LastActivityDate: 2016-03-23T08:57:26.920Z
Answers.LastEditDate: 2017-04-13T12:53:13.207Z
Answers.UserDisplayName: William Mortada
Body: <p>During my update from Civi 4.2 to 4.7 I let it fill in database information that was not correct it connected to the cms database and not the Civi database from the previous install. Is there a file I can edit to have it connect to the old database?</p>
  
Tags: <database><settings>
Title: Connecting Civi to a previous install's database
ThreadText: # Connecting Civi to a previous install's database
  
  (Asked by: username_0 on 2016-03-22)
  
  During my update from Civi 4.2 to 4.7 I let it fill in database information that was not correct it connected to the cms database and not the Civi database from the previous install. Is there a file I can edit to have it connect to the old database?
  
  **Tags:** database, settings
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-03-23. Score: 1
  
  You should edit the civicrm.settings.php file. The location of this file depends on your content management system.
  
  Drupal: `sites/default/civicrm.settings.php`
  
  WordPress: `wp-content/uploads/civicrm/civicrm.settings.php`
  
  Joomla: `administrator/components/com_civicrm/civicrm.settings.php`
  
  You may find this related post helpful: [How do I change the CiviCRM Database name](https://civicrm.stackexchange.com/questions/3503/how-do-i-change-the-civicrm-database-name)
  
  
  ---
  
  