Answers.Body: <p>Let me at least narrow some options for you:</p>
  
  <p>The last idea of "sticking with 4.5.8." is not the way to go.  The Long-Term Support (LTS) version currently is 4.6 (and for the foreseeable future as of writing, see <a href="https://civicrm.stackexchange.com/questions/7/when-will-4-4-lts-end-and-what-will-replace-it/8#8">this question about the LTS jump from 4.4 to 4.6</a>).  You will want to upgrade to at least that at some point (sooner rather than later since there are no more security updates for 4.5).  See <a href="https://civicrm.stackexchange.com/questions/35/what-is-the-civicrm-lts-version-and-should-i-use-it-or-the-latest-stable-releas">this question for more about LTS</a>.</p>
  
  <p>If you want to try the latest and greatest, 4.7 is the one to use.  4.6 is the more stable route.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-27T22:24:51.597Z
Answers.LastActivityDate: 2016-06-27T23:20:42.583Z
Answers.LastEditDate: 2017-04-13T12:53:13.207Z
Answers.UserDisplayName: Allen Hutchison
Answers.Body: <p>I got it to work! Finally! Specifically, I was able to create a second civicrm database. I tried a variety of options using phpMyAdmin and got a variety of errors. Then I downloaded PuTTY <a href="http://www.putty.org/" rel="nofollow">http://www.putty.org/</a> so I could do SSH commands. Then I FTP'd the copy of the civicrm database up to the server. Then I used the SSH command: <code>mysql -h&lt;host&gt; -u&lt;user&gt; -p&lt;password&gt; &lt; yourfile.sql</code>
  Note: no space after the -p</p>
  
  <p>Finally, I changed civicrm.settings.php to point to the new database, did a little testing and it works!</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-28T19:45:35.803Z
Answers.LastActivityDate: 2016-06-28T19:45:35.803Z
Answers.UserDisplayName: jimcrist
Answers.Body: <p>Just so you know, I often times got that same error. The only way around it was to delete and recreate the database. It was like something was still there that I couldn't easily see in the screen I was on in PHPMyAdmin.</p>
  
  <p>It seems to me in the past that I just would create a new database, go into PHPMyAdmin on the current database, go to the one tab (Operations?) and tell it to copy everything into that database. Exporting and importing always seems to cause a number of errors unless you add the code at the beginning and end of the database to tell it to not look at foreign key errors and such.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-06-30T03:33:29.083Z
Answers.LastActivityDate: 2016-06-30T03:33:29.083Z
Answers.UserDisplayName: Jenni Simonis
Body: <p>I use CiviCRM 4.5.8 with WordPress. I'd kinda like to try a newer version, but I don't want to mess up the production website. I used the WP plugin Duplicator to create a test site. I changed the civicrm.settings.php file and now I can maintain the CiviCRM database from either website. Then I tried to use phpMyAdmin to export the civicrm database with a new name. Then I used the DreamHost panel to create a database with that name. The phpMyAdmin import failed with a foreign key check error, so I turned that check off and started over with a new database name. I did the export, create database and import and now I get error "#1050 table civicrm_acl already exists". It's a fresh database, so that doesn't make sense. The database is 44M, so I suspect I'm having some sort of timeout/retry problem? I found <a href="https://wiki.civicrm.org/confluence/display/CRMDOC/Moving+an+Existing+Installation+to+a+New+Server+or+Location" rel="nofollow">Moving an Existing Installation to a New Server or Location</a>, but the copying database part of it confuses me. 7.b. <em>Substitute mysql_username, cms_db_name and dump_file_name_of_your_choice with appropriate values.</em> My SQL experience was last century!</p>
  
  <p>Another strategy, would be a fresh install of a newer version (what recent version would you recommend?). Then I'd have to export the data from 4.5.8 and import it into the new database. We just use the contact database and CiviMail. But wouldn't I lose all the groups, tags, notes, relationships, etc?</p>
  
  <p>The third strategy would be to upgrade the test site and if it works well, I could use either use Duplicator to copy the test site to the production site or upgrade the production to the new version of CiviCRM. So many choices and none of them easy. Maybe I should just stick with good 'ol 4.5.8?? Thanks for any advice!!</p>
  
Tags: <upgrade><database><civicrm.settings.php>
Title: What's the best strategy for upgrading CiviCRM?
ThreadText: # What's the best strategy for upgrading CiviCRM?
  
  (Asked by: username_0 on 2016-06-27)
  
  I use CiviCRM 4.5.8 with WordPress. I'd kinda like to try a newer version, but I don't want to mess up the production website. I used the WP plugin Duplicator to create a test site. I changed the civicrm.settings.php file and now I can maintain the CiviCRM database from either website. Then I tried to use phpMyAdmin to export the civicrm database with a new name. Then I used the DreamHost panel to create a database with that name. The phpMyAdmin import failed with a foreign key check error, so I turned that check off and started over with a new database name. I did the export, create database and import and now I get error "#1050 table civicrm\_acl already exists". It's a fresh database, so that doesn't make sense. The database is 44M, so I suspect I'm having some sort of timeout/retry problem? I found [Moving an Existing Installation to a New Server or Location](https://wiki.civicrm.org/confluence/display/CRMDOC/Moving+an+Existing+Installation+to+a+New+Server+or+Location), but the copying database part of it confuses me. 7.b. *Substitute mysql\_username, cms\_db\_name and dump\_file\_name\_of\_your\_choice with appropriate values.* My SQL experience was last century!
  
  Another strategy, would be a fresh install of a newer version (what recent version would you recommend?). Then I'd have to export the data from 4.5.8 and import it into the new database. We just use the contact database and CiviMail. But wouldn't I lose all the groups, tags, notes, relationships, etc?
  
  The third strategy would be to upgrade the test site and if it works well, I could use either use Duplicator to copy the test site to the production site or upgrade the production to the new version of CiviCRM. So many choices and none of them easy. Maybe I should just stick with good 'ol 4.5.8?? Thanks for any advice!!
  
  **Tags:** upgrade, database, civicrm.settings.php
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2016-06-27. Score: 2
  
  Let me at least narrow some options for you:
  
  The last idea of "sticking with 4.5.8." is not the way to go. The Long-Term Support (LTS) version currently is 4.6 (and for the foreseeable future as of writing, see [this question about the LTS jump from 4.4 to 4.6](https://civicrm.stackexchange.com/questions/7/when-will-4-4-lts-end-and-what-will-replace-it/8#8)). You will want to upgrade to at least that at some point (sooner rather than later since there are no more security updates for 4.5). See [this question for more about LTS](https://civicrm.stackexchange.com/questions/35/what-is-the-civicrm-lts-version-and-should-i-use-it-or-the-latest-stable-releas).
  
  If you want to try the latest and greatest, 4.7 is the one to use. 4.6 is the more stable route.
  
  
  ---
  
  ### Answer by username_0 on 2016-06-28. Score: 2
  
  I got it to work! Finally! Specifically, I was able to create a second civicrm database. I tried a variety of options using phpMyAdmin and got a variety of errors. Then I downloaded PuTTY <http://www.putty.org/> so I could do SSH commands. Then I FTP'd the copy of the civicrm database up to the server. Then I used the SSH command: `mysql -h -u -p < yourfile.sql`
  Note: no space after the -p
  
  Finally, I changed civicrm.settings.php to point to the new database, did a little testing and it works!
  
  
  ---
  
  ### Answer by username_2 on 2016-06-30. Score: 1
  
  Just so you know, I often times got that same error. The only way around it was to delete and recreate the database. It was like something was still there that I couldn't easily see in the screen I was on in PHPMyAdmin.
  
  It seems to me in the past that I just would create a new database, go into PHPMyAdmin on the current database, go to the one tab (Operations?) and tell it to copy everything into that database. Exporting and importing always seems to cause a number of errors unless you add the code at the beginning and end of the database to tell it to not look at foreign key errors and such.
  
  
  ---
  
  