Page 1 of 1
Shared Database for Multiple Installs
Posted: Tue Sep 12, 2023 5:07 pm
by madruga
Hello, I want to ask if it is possible to have multiple installations of Phoenix sharing one database. I want a scenario where I can promote different brand names of my business for different customers. Is this possible? Thanks
Re: Shared Database for Multiple Installs
Posted: Tue Sep 12, 2023 8:45 pm
by Kofod95
I'm not sure, so hopefully others will chime in.
To share the db, the two configure files (includes/configure.php and admin/includes/configure.php) should have the same values in the db-section at the bottom.
The biggest obstacle I can think of, is the configuration table. You'd probably want that to be unique between the sites. However, I think that some of it could be taken care of by overriding this file
https://github.com/CE-PhoenixCart/Phoen ... ration.php (drop a copy into includes/system/override - maybe the path has to be more specific). If you have several configuration tables, you could have them named configuration_shop_a, configuration_shop_b etc.
Then you'd need to figure out where the tables are updated, to make a similar override/edit there.
I haven't tried any of this, so please be careful!
//Daniel
Re: Shared Database for Multiple Installs
Posted: Tue Sep 12, 2023 8:49 pm
by Kofod95
One place that would need a work-around to configure modules separately is here:
https://github.com/CE-PhoenixCart/Phoen ... odules.php
Another one here:
https://github.com/CE-PhoenixCart/Phoen ... ration.php
That, and the action-files (admin/includes/actions/configuration)
//Daniel
Re: Shared Database for Multiple Installs
Posted: Wed Sep 13, 2023 1:10 pm
by madruga
Thank you
@Kofod95 for this informative input. It does seem like this could get very complicated, so I'll have a think if I should explore this or keep running separate stores. It'll have been very nice to implement your suggestion but I don't want to break my stores

Re: Shared Database for Multiple Installs
Posted: Wed Sep 13, 2023 1:29 pm
by Kofod95
You could always try it out on your PC using Xampp or similar - but I'm glad that you are cautious!
//Daniel
Re: Shared Database for Multiple Installs
Posted: Wed Sep 13, 2023 1:57 pm
by burt
I think it would be an interesting thing to try, equally I think it would be a mistake as order id's will be all mixed up, products would need to know where to show in what shop etc.
I think, someone with v.good coding knowledge of Phoenix, is working on some type of Phoenix based (I think) "Mall", which may be what you need. I don't want to tag that person because they'll likely be inundated with messages and emails. Maybe that person will see this post.
Otherwise;
Suggestion #1
Some sort of customer group addon ?
Suggestion #2
Multiple different shops (good possibilities for cross linking)
Re: Shared Database for Multiple Installs
Posted: Fri Sep 15, 2023 8:53 am
by beerbee
Hi,
this could be done with table prefixing for individual tables or groups of them, e. g. common products but individual categories, common orders but individual customers...
It was easy once when there was table definitions.
Kind regards
Christoph