Is it possible to make one installation, and from this installation to make multiple shops with different databases?
Something like I will make one installation on domain.1 with a database, and from admin I will crate a new website and a store on some new database for domain.2.
I know that multiple stores can be achieved with one database. But can it be the same with different databases.
Best Answer
Great answer slarek. We did something very similar. Instead of editing index.php we setup separate folders outside of magento's codebase, and include mage.php from those folders, and then edit the etc_dir (and other dirs) like in your method above.
folder structure:
/www/client1
/www/client2
/www/client3
/www/clientX
/www/magento
Inside each of the client folders are:
in /www/clientx/index.php
define('MAGENTO_ROOT', '/www/magento');
...(rest of index.php is business as usual)...
$client = isset($_SERVER['CLIENT_ID']) ? $_SERVER['CLIENT_ID'] : '';] Mage::run($mageRunCode, $mageRunType, array('etc_dir'=>'../'.$client));
We set