You are here:  » use database other domain


use database other domain

Submitted by wesse249 on Mon, 2016-12-05 10:36 in

Hello David,

I have two different installations. How can i use the database of another domain? Inclusive the feeds and logo's map?

Greetings Jan Roel

Submitted by support on Mon, 2016-12-05 12:15

Hello Jan,

Assuming that the domains are hosted on the same server and the MySQL database of the other domain is accessible then you should just be able to use the same $config_database... settings in config.php.

The first test would just be to configure the new installation as per the other domain and run setup.php - if all tests pass you are good to go.

It is possible however that your web hosting configuration (particularly if you are using a configuration for reseller / virtual hosting) creates different MySQL accounts for each domain, in which case you would need to modify the permissions in order for the new domain to access a MySQL database created with the other domain's account - your hosting company support should be able to help you with this if required.

Regarding using the other domain's /feeds/ and /logos/ folders, again this depends on the security settings of how domains are set-up in your hosting account, however if everything is under a single username and domains are created within a sub-directory of that single user account, for example;

/home/username/domains/example.com/public_html/
and
/home/username/domains/example.org/public_html/

Then the easiest thing to do would be to make the feeds and logos folders in the new domain be "symbolic links" to the same folder in the other domain. The only easy way to do this is from the command prompt i'm afraid, so the commands would be, based on the above example:

cd domains/example.org
mv feeds feeds_old
mv logos logos_old
ln -s /home/username/domains/example.com/public_html/feeds feeds
ln -s /home/username/domains/example.com/public_html/logos logos

(make sure the cd (change directory) command is to the new installation, but i've included the mv command to make backups just incase!)

With the symbolic links in place, both installations will see the same, single feeds and logos folders from the other domain...

Hope this helps!

Cheers,
David.
--
PriceTapestry.com