3

I just installed CiviCRM for the first time on a test Wordpress installation for checking out CiviCRM. I followed the instructions at https://wiki.civicrm.org/confluence/display/CRMDOC/Installing+CiviCRM+for+WordPress and used civicrm-4.7.10-wordpress.zip. For some reason, when running: http://{wordpress install directory}/wp-admin/options-general.php?page=civicrm-install, the database part of the form is populated with the Wordpress database. I created a clean, empty MySQL database and tried to enter it. When I pressed the Check Requirements button, it replaced the database name with my Wordpress database name. Everything works, but I really wanted to have the Wordpress tables and CiviCRM tables in separate databases for future site management. Is there a way, after the fact, to point to the database I want? I can easily export the CiviCRM tables and import them into the clean database.

Thanks for any help here and sorry if this is simple - this is my first day working with CiviCRM.

5

OK. I was able to fix it by

  1. Directly editing wp-content/uploads/civicrm/civicrm.settings.php to point to the new clean civicrm-only DB.
  2. Exporting the civicrm tables only from my original wordpress DB.
  3. Importing the exported civicrm tables into the new, blank civicrm-only DB.
  4. Dropping the civicrm tables from the original wordpress DB so it is wp-only.

All seems to be working, but it seems like I should have been able to easily set this up with the install script, which seemed to override anything that I put in for the CiviCRM DB by the WordPress DB.

All looks OK. For the more experienced CiviCRM folks, can there be any gotchas here?

2

I'll add this as an answer - The Recheck requirements button resets the DB credentials. I expect this happened between testing when we implemented defaulting to using the WP Database and the credentials in wp-config.php.

In any case, this needs to be fixed. Issue - https://issues.civicrm.org/jira/browse/CRM-19279

  • Interesting. I "almost" installed the LTS version 4.6.20, in which case then I wouldn't have had the issue. Glad to help you shake out 4.7.x ;) As a s.w developer, I know how easy it is to introduce unintended side effects. Thanks for getting this ironed out. – Karl Rudnick Aug 31 '16 at 14:29
  • We'd love your help. github.com/civicrm/civicrm-wordpress/pull/87 is the PR that made the installer changes in the Wordpress specific repo and this PR is the core one that matches - github.com/civicrm/civicrm-core/pull/6926 We had tested this at the time, so the changes may have been introiduced, later, but there are a small set of files we need to go through. I expect the issue to be in install/civicrm.php or install/index.php – Kevin Cristiano Aug 31 '16 at 16:07
  • I really don't have time to dig into the code, but I will offer one clue that may help understand the problem. For both the WP and CiviCRM databases, i have the same user and password. Only the database names are different and the Recheck button kept changing the name (at least). – Karl Rudnick Sep 1 '16 at 1:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.