Note that this page is intended for installations where you have access to a shell in the server to run commands. Alternatively, you might want to follow the steps of the Installation instructions if you only have ftp access to your host.

You can do this "manually", even for MultiTiki installations.

Note: For Tiki5.1 and onwards (5.3, 6.0, ...), you need to enforce the charset of the connection to utf-8 (unless you know very well what you are doing). Therefore, you need to add in your custom local.php files this new line:

1. MultiTikis using SubDomains

This section describes a sub-domain MultiTiki setup, where a subdomain points to a directory immediately below your www directory, e.g.:

1.1. Create subdirectories

If you can't use (See MultiTiki) and/or tiki-install.php, you have to create your subfolders manually for your multitiki installation to work, but you'll need to make symlinks (or have them made for you by an admin), as many as sites you want to install with the same multitiki setup.

You could run ./ and provide the two names (site1 and site2 afterwards, when requested after the [multi]: option), or you need to manually create your subdirectories site1 and site2 inside each of the following folders (list of folders are defined as the DIR_LIST_WRITABLE variable in ):


1.2. Add a single customized local.php for all

You need to add a manually modified ./db/local.php with the following syntax:


if ($_SERVER["HTTP_HOST"] == "" || $_SERVER["HTTP_HOST"] == "") {
  $user_tiki = 'user1';
  $pass_tiki = 'pass1';
  $tikidomain = "site1";
  $dbs_tiki = "tiki30_site1";
} elseif ($_SERVER["HTTP_HOST"] == "" || $_SERVER["HTTP_HOST"] == "") {
  $user_tiki = 'user2';
  $pass_tiki = 'pass2';
  $tikidomain = "site2";
  $dbs_tiki = "tiki30_site2";
} else {
  $user_tiki = 'user1';
  $pass_tiki = 'pass1';
  $tikidomain = "site1";

1.3. Add local.php for each site

Proceed as usual with tiki-install.php, or if you can't for whatever reason, then, add a standard local.php file inside each of each multitiki subfolders of db, i.e.:




You need to create symbolic links (symlinks) in order to make your multitiki in subdirectories work.
Example 1
Imagine your www root is at:

and you want to setup your multitiki out of the apache public directory, but here instead, for example:

Then you need to create symlinks (or request them to be created by an admin for you), with instructions like these (prepending "sudo" to the commands or switching to the root account):

ln -s /var/tiki /var/www/site1
ln -s /var/tiki /var/www/site2

Note: Make sure the site1 and site2 directories do not exist before executing the above commands.

1.5. Running tiki-install

You are done with the manual setup. One by one, browse to each of your MultiTiki sites (e.g. http://localhost/site1/ and http://localhost/site2/) and start configuring them individually.

If you setup a common username and password for all your multi-tiki's, then the tiki-install.php script (Tiki 3.0) will recognize the MultiTiki installation as you proceed.

tiki-install_multitiki.gif (39.34 Kb)

If you manually coded the db/local.php files and the /db/siteX/local.php files correctly, the tiki-install script sees all the databases as connected. On the left hand side of the image below, all but one database is showing connectivity. If you are happy, you can just use the existing connection to proceed.

tiki-install_MultiTikiConnection.gif (21.79 Kb)

NOTE (by little_papillon): in my installation (multi-tiki with multiple domains), I had to update information in /db/ before tiki-install.php would list the multitiki-sites

2. MultiTikis in subdirectories (Directory Structure Setup)

Suppose you want to avoid subdomains or would instead like your tiki structure to be directly accessed and located within a single directory (e.g. under a /var/tiki/, out of the public htdocs folder of your server, for instance, and symlinked from /var/www/site1 and /var/www/site2 )


The setup is similar to a subdomain MultiTiki setup (see above). By way of example, we will be setting up site1 and site2 with the URLs shown at the top of this section. This example assumes a directory /var/www/ where your sub-tiki's will be "located". For sake, if someone does enter we have setup to redirect them to the main (site1).

We begin by loading all the tiki files into the /var/tiki/ directory.

2.1. Create Subdirectories

Per instructions above, either run or manually create the required subdirectories for your various tikis (tiki1, tiki2)

2.2. Add a single customized local.php for all

This is where we will diverge somewhat slightly from the subdomain strategy. Namely, we need to test the REQUEST_URI to determine where to funnel the visitor.

Once again, with our specific example values shown, you need to add a manually modified ./db/local.php with the following syntax:



//the array[0] is empty, array[1] == site1

$requestedtiki = $url_array[1];

if ($requestedtiki == "site1") {
  $tikidomain = 'site1';
  include "site1/local.php";
} elseif ($requestedtiki == "site2") {
  $tikidomain = 'site2';
  include "site2/local.php";
} else {
  $tikidomain = 'site1';
  include "site1/local.php";
  header( 'Location:');

Note how if all else fails, we'll send the user directly to our tiki of choice (site1).

2.3. Add local.php for each sub-tiki

Again, we'll branch a little from the prior setup by populating out the local.php files for each tiki.

At this point, it helps to take a side step and set up your databases (see documentation elsewhere). For simplicity you may want your MultiTikis to share a common username/password, but this is not necessary (or particularly secure).

Below is an example for our site1. This file would get saved under ./db/site1/local.php


You need to create symlinks (or request them to be created by an admin for you), with instructions like these:

cd /var/tiki/       //cd into the main tiki directory
ln -s . /var/www/site1
ln -s . /var/www/site2

This will effectively redirect a visitor headed to to where our local.php script will parse the REQUESTED_URL, realize that the user wants site2 and proceed accordingly. If the visitor attempts to visit, he/she will be redirected to instead.

2.5. Run tiki-install.php

Now, for each site, you will browse to it and run tiki-install.php (e.g.

A few notes:

  • Since we went ahead and setup our ./db/site1/local.php files, you will see that the installer recognizes the MultiTiki's during the setup.
    • ''Not sure if this is required, but during installation it seemed to be important to click on the MultiTiki (selecting it and turning it bold) that you are installing.
    • Given the above, since the database is setup, you can use the Existing Connection you selected.
  • If you are setting up multiple tiki's, use the Enter Without Locking The Installer until you get to the last keep from having to constantly delete the ./db/lock file.

3. Extra: Add .htaccess for all (optional)

You can also add a single customized .htaccess for them all at the MultiTiki root
See Rewrite rules | Apache Clean URLs

Related pages

See also
  • TRIM - TikiWiki Remote Instance Manager