Answers.Body: <p>There is some documentation here that should help: <a href="https://docs.civicrm.org/sysadmin/en/latest/misc/switch-servers/" rel="nofollow noreferrer">https://docs.civicrm.org/sysadmin/en/latest/misc/switch-servers/</a>  </p>
  
  <p>Are you copying the Wordpress database as well?</p>
  
  <p>You are trying to switch servers and upgrade at the same time.  I would strongly suggest you do that in multiple stages: first move to the new server using the same versions of Wordpress and CiviCRM - make sure that is working correctly, and then upgrade.</p>
  
  <p>Switching to a new server involves changes with URL's, directories, passwords etc so get that set of issues resolved first.  That is often more tricky than upgrading.</p>
  
  <p>You are also going from 4.4 to 4.7 which is a big leap. Opinions vary as to the best way of doing that: a single upgrade should work, but you may be better to upgrade to the last 4.5, take a backup, upgrade to the latest 4.6, take a backup then go to 4.7. It is extra steps but may save you time in the end if things go wrong.</p>
  
  <p>To your issues with passwords: to dump the databases from the old server, you need the password for the old server.  When you load it to the new server, you need the new password.  <code>civicrm.settings.php</code> needs to have the new passwords but the changes you need to make depend on which option you follow in the guide for copying the codebase (Step 4).</p>
  
  <p>If that looks too daunting there are plenty of people at <a href="https://civicrm.org/partners-contributors" rel="nofollow noreferrer">https://civicrm.org/partners-contributors</a> who would help.  (Yes, I'm one of them!)</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-08T16:05:08.897Z
Answers.Text: Thanks for your reply Aidan! I didn't realize there was also a Wordpress database. Is that typically migrated too? Which database is the wp-config supposed to point to? The WP DB or the CiviCRM DB? Also thanks for letting me know about the partners. I may need to call on you if I can't get unstuck.
Answers.UserDisplayName: gilesitis
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-08T20:04:59.530Z
Answers.Text: Update: I started over all installed the older versions of WP and Civi to match what's on the old server. It looks like the WP database is working correctly because it is showing the organization's name and email. I then installed the Civi plugin and during the checks it showed it could log in and access the database. However, all the reports I run come back and say 'no results found' , so it looks like something is still amiss with the civi DB. Any suggestions on what to check next?
Answers.UserDisplayName: gilesitis
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-08T23:26:42.090Z
Answers.Text: Update 2: I ran some queries on the database that was copied onto the new server. I can see the tables in the database, but doing a SELECT * FROM CiviCRM_contribution returns an empty set. The same query ran on the old server DB returns results.
Answers.UserDisplayName: gilesitis
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-09T00:27:42.833Z
Answers.Text: Update 3: Problem appears to be solved. Using some GoogleFu, I found there are two separate commands for backup/restore of a DB. I had used mysqldump for both. I recopied the DB using mysql (instead of mysqldump) to restore it. The query returned results and I'm seeing data in my CiviCRM reports. Thanks for your guidance!
Answers.UserDisplayName: gilesitis
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-12T08:49:43.233Z
Answers.Text: Well done @gilesitis - looks like you have persevered and been successful!
Answers.UserDisplayName: Aidan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-13T20:32:33.007Z
Answers.Text: Thanks Aidan. The old site was accessed by the user remoting into the host server and then launching a browser. I would like for them to be able to access this site from any node on the LAN (instead of RDP to the server). I've tried changing localhost to the server name in all the places mentioned in the documentation, but when I access from computer other than the host, it will allow me into Wordpress, but CiviCRM either can't connect or shows a bareones looking page with no menu. Any ideas what I've done??
Answers.UserDisplayName: gilesitis
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-14T10:35:06.190Z
Answers.Text: Check `CIVICRM_UF_BASEURL` in `civicrm.settings.php` and `Administer > System Settings > Resource URLs`
Answers.UserDisplayName: Aidan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-19T13:42:18.763Z
Answers.Text: I've not had a chance to try this, but I wanted to thank you for your help Aidan.
Answers.UserDisplayName: gilesitis
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-08T09:35:11.163Z
Answers.LastActivityDate: 2017-12-08T09:35:11.163Z
Answers.UserDisplayName: Aidan
Body: <p>I am attempting to migrate an existing Wordpress CiviCRM installation to a new server, but am having some difficulty with the database part.</p>
  
  <p>The existing installation is Wordpress 3.8.1 and CiviCRM is 4.4.3. The installation on the target server is Wordpress 4.9.1 and CiviCRM 4.7.27.</p>
  
  <p>I used mysqldump to copy the existing database and then transferred to the new server. I used the mysql root login to execute these commands on both servers. </p>
  
  <p>Once I got the database copied to the target installation, it appeared that no database was there when I ran a report in CiviCRM. So I went back to the original wp-config file and noticed there was a different username and password for the original database (not the root one I used to transfer). I then changed the target server's wp-config file to reflect the other password (shown on the old server), but began getting WP login errors, saying the password was incorrect.</p>
  
  <p>I retrieved the old installation's WP password and was able to login (after changing the wp-config file back to root DB credentials. I had to do that before I could bypass a screen that said 'database connection failure'. But anytime I change the new wp-config file to use the same DB username and password as on the old wp-config file, it throws the database connection error.</p>
  
  <p>I figured since it allowed me to transfer the database using the root password, then I could use that in the wp-config file, but I'm not sure if that's right.</p>
  
  <p>Any ideas what might be going on? I feel like I've missed a step or done something incorrectly. Hopefully my situation makes sense. Many thanks to anyone who could point me in the right direction.  </p>
  
Tags: <wordpress><database><mysql><migration>
Title: CiviCRM Wordpress Migration: Stumped by the Database
ThreadText: # CiviCRM Wordpress Migration: Stumped by the Database
  
  (Asked by: username_0 on 2017-12-08)
  
  I am attempting to migrate an existing Wordpress CiviCRM installation to a new server, but am having some difficulty with the database part.
  
  The existing installation is Wordpress 3.8.1 and CiviCRM is 4.4.3. The installation on the target server is Wordpress 4.9.1 and CiviCRM 4.7.27.
  
  I used mysqldump to copy the existing database and then transferred to the new server. I used the mysql root login to execute these commands on both servers.
  
  Once I got the database copied to the target installation, it appeared that no database was there when I ran a report in CiviCRM. So I went back to the original wp-config file and noticed there was a different username and password for the original database (not the root one I used to transfer). I then changed the target server's wp-config file to reflect the other password (shown on the old server), but began getting WP login errors, saying the password was incorrect.
  
  I retrieved the old installation's WP password and was able to login (after changing the wp-config file back to root DB credentials. I had to do that before I could bypass a screen that said 'database connection failure'. But anytime I change the new wp-config file to use the same DB username and password as on the old wp-config file, it throws the database connection error.
  
  I figured since it allowed me to transfer the database using the root password, then I could use that in the wp-config file, but I'm not sure if that's right.
  
  Any ideas what might be going on? I feel like I've missed a step or done something incorrectly. Hopefully my situation makes sense. Many thanks to anyone who could point me in the right direction.
  
  **Tags:** wordpress, database, mysql, migration
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-12-08. Score: 3 | Accepted answer
  
  There is some documentation here that should help: <https://docs.civicrm.org/sysadmin/en/latest/misc/switch-servers/>
  
  Are you copying the Wordpress database as well?
  
  You are trying to switch servers and upgrade at the same time. I would strongly suggest you do that in multiple stages: first move to the new server using the same versions of Wordpress and CiviCRM - make sure that is working correctly, and then upgrade.
  
  Switching to a new server involves changes with URL's, directories, passwords etc so get that set of issues resolved first. That is often more tricky than upgrading.
  
  You are also going from 4.4 to 4.7 which is a big leap. Opinions vary as to the best way of doing that: a single upgrade should work, but you may be better to upgrade to the last 4.5, take a backup, upgrade to the latest 4.6, take a backup then go to 4.7. It is extra steps but may save you time in the end if things go wrong.
  
  To your issues with passwords: to dump the databases from the old server, you need the password for the old server. When you load it to the new server, you need the new password. `civicrm.settings.php` needs to have the new passwords but the changes you need to make depend on which option you follow in the guide for copying the codebase (Step 4).
  
  If that looks too daunting there are plenty of people at <https://civicrm.org/partners-contributors> who would help. (Yes, I'm one of them!)
  
  > **Comments:**
  > **username_0**: Thanks for your reply username_1! I didn't realize there was also a Wordpress database. Is that typically migrated too? Which database is the wp-config supposed to point to? The WP DB or the CiviCRM DB? Also thanks for letting me know about the partners. I may need to call on you if I can't get unstuck.  
  > **username_0**: Update: I started over all installed the older versions of WP and Civi to match what's on the old server. It looks like the WP database is working correctly because it is showing the organization's name and email. I then installed the Civi plugin and during the checks it showed it could log in and access the database. However, all the reports I run come back and say 'no results found' , so it looks like something is still amiss with the civi DB. Any suggestions on what to check next?  
  > **username_0**: Update 2: I ran some queries on the database that was copied onto the new server. I can see the tables in the database, but doing a SELECT * FROM CiviCRM_contribution returns an empty set. The same query ran on the old server DB returns results.  
  > **username_0**: Update 3: Problem appears to be solved. Using some GoogleFu, I found there are two separate commands for backup/restore of a DB. I had used mysqldump for both. I recopied the DB using mysql (instead of mysqldump) to restore it. The query returned results and I'm seeing data in my CiviCRM reports. Thanks for your guidance!  
  > **username_1**: Well done @username_0 - looks like you have persevered and been successful!  
  > **username_0**: Thanks username_1. The old site was accessed by the user remoting into the host server and then launching a browser. I would like for them to be able to access this site from any node on the LAN (instead of RDP to the server). I've tried changing localhost to the server name in all the places mentioned in the documentation, but when I access from computer other than the host, it will allow me into Wordpress, but CiviCRM either can't connect or shows a bareones looking page with no menu. Any ideas what I've done??  
  > **username_1**: Check `CIVICRM_UF_BASEURL` in `civicrm.settings.php` and `Administer > System Settings > Resource URLs`  
  > **username_0**: I've not had a chance to try this, but I wanted to thank you for your help username_1.  
  
  ---
  
  