Skip to main content

MightySites case studies

Sharing database data between existing independent websites

You have independent websites http://master.com and http://slave.com and want slave site to have same database data for certain contents as in master site.

MightySites allows you to share preferred database tables for each site on individual table basis or per-component basis.

I.e. 2nd site (will) can share users with 1st site and users will be always same in both sites because users database tables of master site will be used by both sites.

No matter where user registers - he will be able to login in any site next.

I't also possible to setup single login/logout: once user logs in master site - he will be also logged in slave site and vice-versa.

Shared components can be managed from any site - data will be same in all sites.

Usually update of shared extension can be performed in any site only once.

Note that you can share only the data without relationships or the data with all relationships. I.e. can't share only articles and categories because they depend on users and assets. Besides, sharing of categories means sharing of categories from all extensions, not only articles (com_content).

Both sites should use same MySQL server and MySQL user of slave site should have access to database of master site (full privileges) if different databases are used.

Note that having master and slave site as independent hosts won't share images: i.e. community avatars images won't be shared if you share users and community extension database data. You will need to either use same files for both sites (parked domains, and it leads to using same database tables at least for Joomla core) or use symlinks on slave site pointed to folders on master site.