Вы находитесь на странице: 1из 10

1

Installation instructions – MightySites

Please use only our Support Center if you have any problems.
Please don’t use our Forums for any issues/support, such posts are deleted, besides support
team reads this forum very rare.

Contents:

Installing / Removing the Extension ......................................................................................................................... 2

Sites and Databases ..................................................................................................................................................... 3

Creating a Database .................................................................................................................................................... 4

Creating a Site .............................................................................................................................................................. 5

Creating a Site in subfolder ....................................................................................................................................... 6

Content Sharing ............................................................................................................................................................ 7

Single Login and Logout .............................................................................................................................................. 9

Possible problems, Tips and Tricks ......................................................................................................................... 10


2

Installation instructions – MightySites

Installing / Removing the Extension

1. MightySites is installed and deinstalled as package. Joomla package is a ZIP file which may
contain a component + modules + plugins, all installed in one click. Note that you need to
deinstall package MightySites, not component MightySites.

2. MightySites consists of a component and a system plugin which is auto-installed, auto-


deinstalled and auto-upgraded with the extension package.

3. Ensure that your /plugins/system folder is writable.

4. Install the ZIP package in Joomla! Extensions Manager as usual.

5. If you see the error messages like Warning! MightySites system plugin wasn't installed
successfully! please check p.3 again.

6. Navigate to Components -> MightySites in top menu.

7. Please note that access to MightySites backend is limited to your default domain where
MightySites was originally installed.

8. For removing the extension please deinstall MightySites package, not component!
3

Installation instructions – MightySites

Sites and Databases

MightySites has 2 main terms: ‘Site’ and ‘Database’:

Site is a complete Joomla! website with separate own global configuration. Site can use other
databases for its contents and can be accessed as a usual website.

After installing the extension you see your default domain in MightySites->Sites.

Click ‘Global configuration’ link next to your default domain and save configuration.

You can edit Global configuration either from this link next to domain or via direct access to
Global Configuration in top backend menu as usual.

Note that using links ‘Global configuration’ and ‘Administration’ next to domain name will auto-
login you to this site, so can easily manage all configurations from MightySites backend. Auto-
login requires

Database is just a database settings of another Joomla! site which can be used by Sites for
loading content.

Enter MightySites->Databases, you will see database of main site here: each Site has a
database and it is added to databases list automatically.

Column Origin indicates if database is site’s database (value Site) or database was manually
configured by you (value Settings).

You can’t delete databases of sites, once the site is deleted is database will disappear from
databases list.
4

Installation instructions – MightySites

Creating a Database
Let’s solve a typical task – we have our site slave.com and we want it to show contents from
another site master.com. We also want it to use users data from master.com, so all users from
master.com will be able to login in slave.com and vice-versa.

We need to configure database settings of master.com in MightySites installed in slave.com:

1. Go to Components->MightySites->Databases, click top ‘New’ icon.

2. Enter the name in ‘Title:’ setting, this can be any name, just for you information. We enter
‘master.com’ here.

3. You can optionally select any database in ‘Copy Tables From’ setting, and MightySites will
copy its tables to our new database. But this is not our choice now, we suppose that all tables
already exist in database of master.com.

4. Switch to ‘Database’ tab – here are the database settings.

5. Enter the database name and tables prefix of master.com. These settings can be seen in
Global configuration of master.com.

You can optionally create database by clicking ‘Create Database’ button. Note that your
MySLQ user should have enough permissions.

6. Click ‘Check connection’ button.

7. You should see ‘Successfully connected.’ message. If you see an error message in red – that
in most cases means that database user of your slave.com doesn’t have access to database
of master.com. You need to grant this access in this case: ask your hosting provider to grant
access of slave.com database user to database of master.com if you don’t know how to do it.

8. Click ‘Save’ icon.

9. New database tables will be created if you selected the ‘Copy Tables From’ setting.

10. Now you can edit Site ‘slave.com’ and setup content sharing: click your ‘slave.com’ in
MightySites: Sites to edit it.

11. Switch to ‘Content Sharing’ tab, select your database ‘master.com’ in drop-downs for
different content which should be loaded from master.com (we need Users). You can also
select the location of specific database tables directly (by default no tables are displayed, but
you can see all tables by clicking ‘Load Tables’ button, this is rarely used feature and no
need to always load all tables in this page by default).

12. Enable ‘Enable Sharing’ setting. This setting activates loading of content from other
database and is useful if you want to temporary disable external contents.

13. Click ‘Save’ icon.

14. Now slave.com will load the selected content from master.com.
5

Installation instructions – MightySites

Creating a Site

Imagine that you have a default site master.com and you want to have a similar site slave.com,
but with different contents or almost same contents.

And these 2 domains should use the same Joomla installation of master.com, + slave.com
should load users from master.com:

1. Ensure that domain slave.com is pointed to nameservers used by master.com.

2. Park slave.com on top of master.com in your hosting panel. Please ask your hosting
provider to help this if you don’t know how. Once slave.com is parked you should see a
MightySites’s error message like ‘Invalid domain’ by accessing http://slave.com.

3. Go to Components->MightySites->Sites and click top ‘New’ icon.

4. Enter the ‘Domain’ name – slave.com

5. Optionally enter ‘Domain Aliases’ – these are domains which will use same settings. It’s a
good idea to use live site as ‘Domain Name’ and development site as an alias.

6. Select the ‘Configuration source’, new slave.com will have these settings copied, you
can personalize them later as usual in Global configuration of slave.com

7. Optionally select the ‘Copy Tables From’ – new site will have database tables of this
database copied. We select ‘master.com’ here, so our new slave.com will have the
database tables of master.com copied to own tables set.

8. Switch to ‘Database’ tab and setup the database settings for slave.com.
You can either create a new separate database for it, or use the database of master.com
but have tables with different tables prefix.

Example:
Our master.com has database ‘master’ with tables prefix ‘jos_’.
1. New site slave.com can have its own database ‘slave’ with tables prefix ‘jos_’.
2. Or we can use the same database ‘master’, but have another tables prefix, i.e. ‘slave_’.

9. Click ‘Check connection’ button to ensure that new database settings are correct and
MySQL user of current site master.com has access to database of slave.com.

10. Click ‘Save’ icon. New database tables will be created if you selected the ‘Copy Tables
From’ setting.

11. Now you can load http://slave.com as usual website and setup its content sources, see
p.11-13 above for configuring slave.com to load Users from master.com.

12. ‘Overrides’ settings of Site allow you to override default Language, Homepage and
Template Style, so sites can use same database tables, but still different language and
homepage. You can load own language strings, setup own cache path and custom CSS
files.
6

Installation instructions – MightySites

Creating a Site in subfolder

MightySite also allows you to run virtual sites like http://master.com/subfolder.

Symbolic link ‘subfolder’ is auto created to Joomla installation folder of main site, so this new
slave site uses same files as master site.

The procedure of creating such a site is same as described above, you need to setup a domain
name ‘master.com/subfolder’ for new site.
7

Installation instructions – MightySites

Content Sharing

Imagine that we need our site slave.com to share Joomla users and articles with master.com.

Sharing means that slave.com will load these contents from database of master.com, so both
sites will use same database tables.

Any action like select/edit/delete/create user or article in any of these sites will actually affect only
database tables of master.com, so both sites will always display same contents.

If your slave.com is not already created as Site in MightySites – you need to install MightySites
in slave.com and proceed with steps below (note – install in slave site only, no need to install it
in master site).

If your slave.com is already created as Site in MightySites – just proceed with next steps:

1. Edit slave.com site in MightySites and go to ‘Content Sharing’ tab of settings.

2. Enable ‘Content Sharing’ setting. This setting globally controls all replacements of
contents, you can temporary disable sharing by deactivating this setting.

3. Select you master.com in drop-downs next to ‘Content’ and ‘Users’ labels. Mouse over
label shows a small tip about what does this label control.

Drop-downs contain the available sources for contents, all Sites and Databases configured
in MightySites are displayed. You can load contents not from sites only, but also directly
from manually configured databases.

‘- Own data -’ means that content is loaded from own database of site as usual.

4. You can optionally map database tables to 3rd-party sites and databases directly in
‘Database tables’ area.

5. Save site settings.


8

Installation instructions – MightySites

Note: you don’t need to map ALL contents to 3rd-party site of database if you want slave.com
to load ALL contents from master.com! You should setup database settings of slave.com
exactly as in master.com, so slave.com will use database tables of master.com directly,
without any replacements and sharing.
9

Installation instructions – MightySites

Single Login and Logout

You can optionally use single login/logout features for the domains.

Now we will setup single login-logout from master.com to slave sites.

1. Edit master.com in MightySites and enable the settings first:

2. Next enter the domains the user should be logged in/out when logging in/out in
master.com:

‘Secret Key’ can be obtained from Basic settings of a Site, or directly from the website’s
Global configuration file, open /configuration.php or
/configuration_your_domain_name.php and see the line like:

public $secret = 'Pd26ACRJmIzlqN8X';

Secret word is Pd26ACRJmIzlqN8X here.

3. Install and publish the plg_system_mightysites_single plugin on each of these slave


domains where auto-login/logout should occur.

4. Note that if you setup single login/logout to slave.com in settings of master.com – this will
only work for user’s login/logout in master.com, but not reverse in slave.com.

For single login/logout to master.com from slave.com please also setup domain
master.com and its secret key in settings of slave.com site.
10

Installation instructions – MightySites

Possible problems, Tips and Tricks

1. I have Kunena installed in main site, now I install it in slave site (which either uses same
folder as main site or same database) and its installation fails.

Solution: unfortunately, Kunena doesn’t check for database tables presence before install, so it
always tries to install yourself from the scratch.

Please just install it as usual in slave site and delete


/administrator/components/com_kunena/install.php file.

2. I have Joomla 3 and want to have single login for main site site.com and slave site
shop.site.com.

Solution: you don’t have to use Single Login/Logout settings for these sites, please leave them
empty.

You need to setup ‘.site.com’ Cookie Domain for both sites and same ‘Secret Key’.

Next ensure that Users and Sessions are shared.

So you will actually get single session.

Вам также может понравиться