CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • WordPress Installations (Moderators: Kurund Jalmi, Coleman Watts) »
  • two civicrm installations on one database
Pages: [1]

Author Topic: two civicrm installations on one database  (Read 526 times)

heidi durhuus

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 4.5
  • CMS version: WordPress 4.0
  • MySQL version: MySQL server version 5.5.38
  • PHP version: php 5.3
two civicrm installations on one database
September 25, 2014, 02:52:56 am
My hosting only provides one database pr domain. I want to create a test environment with wordpress and CiviCRM using the same database as the live wordpress and CiviCRM are in.
It went fine to have two installations of wordpress (the tables are then named wp_ and test_wp0_). Then I installed CiviCRM as a plugin on the test_wp. All the CiviCRM tables are named civicrm_, so far so good.
Has anyone tried to do a second installation on the same database? (I am just concerned that I might crash the whole thing)

Do you have other advise on how to create a testing environment with only one database?
« Last Edit: September 25, 2014, 04:55:22 am by heidi durhuus »

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: two civicrm installations on one databse
September 25, 2014, 02:56:08 am
Preety sure this is not possible with Civi today

Lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Dan C

  • I post frequently
  • ***
  • Posts: 179
  • Karma: 17
  • CiviCRM version: All
  • CMS version: Joomla 2.5 and 3.X, Drupal 7, Wordpress 3.7 and up
  • MySQL version: 5.1.7 and up
  • PHP version: 5.3.5 and up
Re: two civicrm installations on one database
September 25, 2014, 08:14:30 am
To echo Lobo's response, I'm pretty sure it wouldn't be possible.  There is no where in the configuration of Civi where you can define the table prefix, so it will always be civicrm_
CrusonWeb - Web Development, Implementation, and Support.  Specializing in CiviCRM and Joomla (although also knowledgable in Wordpress and Drupal as well).

heidi durhuus

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
  • CiviCRM version: 4.5
  • CMS version: WordPress 4.0
  • MySQL version: MySQL server version 5.5.38
  • PHP version: php 5.3
Re: two civicrm installations on one database
September 26, 2014, 12:59:10 am
Thank you for your responses, which confirmed my thought.

Does anyone of you have a "best practice" of how to run a test environment, when you only have one database available from your hosting?

Or should I just focus on careful backup...


Dan C

  • I post frequently
  • ***
  • Posts: 179
  • Karma: 17
  • CiviCRM version: All
  • CMS version: Joomla 2.5 and 3.X, Drupal 7, Wordpress 3.7 and up
  • MySQL version: 5.1.7 and up
  • PHP version: 5.3.5 and up
Re: two civicrm installations on one database
September 26, 2014, 05:46:41 am
Unfortunately (or I guess fortunately for me) I have never had a host that said I could only have one database so I have been able to create development versions of sites without a problem.  Backups are always a good idea though, just make sure that if you are doing them via database export that you disable Foreign Key Checks (this is a setting in phpMyAdmin).  CiviCRM uses a lot of Foreign Keys in the database and if you don't disable them it can make reimporting difficult.
CrusonWeb - Web Development, Implementation, and Support.  Specializing in CiviCRM and Joomla (although also knowledgable in Wordpress and Drupal as well).

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • WordPress Installations (Moderators: Kurund Jalmi, Coleman Watts) »
  • two civicrm installations on one database

This forum was archived on 2017-11-26.