[Show/Hide Right Column]

How to Install Multiple TikiWikis Using Subdomains on Windows XP

This page describes how to install multiple TikiWiki applications under one Apache web (HTTP) server using the “MultiTiki”-subdomain approach.

The PDF Document describing these steps can be found here:
MultiTiki Apache and Windows Configuration.pdf (390.57 Kb)

Windows XP Professional 2002
Service Pack 3

Apache HTTP Server 2.2

Apache, PHP, and MySQL were installed as part of installing XAMPP, so the locations of their respective directories may differ from what is on your machine.

The resulting installation will have one TikiWiki code-base (php, smary, javascript, etc.) and three distinct MySQL databases (housed under one MySQL relational database management system). TikiWiki’s installer program will create additional directories for each sub-domain, that would not ordinarily be seen after installing a single TikiWiki application.

1. Create a directory in a location outside of Apache’s root directory.

In XAMPP, Apache serves up files out of the “htdocs” directory for example: C:\xampp\htdocs . On your machine Apache may serve files out of “www” or “public_html”.

If you are not sure of what your root directory is, locate the httpd.conf file under the apache installation, and search for the following section…

MultiTiki3WindowsXP-10.PNG (5.10 Kb)

In this document, I created a directory called subdomains (name it what you like) as follows…


2. Unzip (or decompress) the TikiWiki-3.1.zip file.

In this example, I rename TikiWiki-3.1 to "taf" - the name of my application - so I end up with “C:\subdomains\taf”

You will serve-up TikiWiki out of this directory “C:\subdomains” , rather than Apache’s root directory.

3. Locate and create a backup of Apache’s “httpd.conf” file.

In an XAMPP install, it can be found here:


4. Modify the “httpd.conf” file not the backup as described below…

MultiTiki3WindowsXP-1.PNG (46.90 Kb)

5. Locate the “hosts” file on your Windows XP machine and add your subdomains.

It can usually be found at:


The host file will probably already contain a definition for “localhost”. Simply add your subdomain names immediately after it, separating each with one space “ “. Here, I have chosen three subdomain names prefixed to “localhost”, with a dot “.” in between… localhost demo.localhost test.localhost pilot.localhost

MultiTiki3WindowsXP-2.PNG (128.81 Kb)

6. Locate the “httpd-vhosts.conf” file, in the “extra” subdirectory at the following location.


If you do not have this file, you can probably create the same definitions within the “httpd.conf” file, under the section for Virtual Hosts.

7. Define your virtual hosts as follows...

NameVirtualHost *

<VirtualHost *>
ServerName pilot
DocumentRoot "C:/subdomains/taf"

<VirtualHost *>
ServerName demo
DocumentRoot "C:/subdomains/taf"

<VirtualHost *>
ServerName test
DocumentRoot "C:/subdomains/taf"

# It is very important to get the syntax correct here.  
# Put “NameVirtualHost *” at the top and for each of your subdomains put…
#    <VirtualHost *>
#    ServerName subdomain1
#    DocumentRoot “C:/path/to/your/subdomain/directory”
#    </VirtualHost>
# Of course, “subdomain” should be replaces with one of your subdomain names, 
# and the Document root should match what you created in the first step.  
# Note the direction of the slashes “/”

8. Restart your Apache web server, after you have saved the changes to httpd.conf, hosts, and (possibly) httpd-vhosts.conf.

You are probably running it as a service on Windows XP, and you can restart it by doing the following: Start > Run > “services.msc” > OK > right-click Apache 2.2 --> select “Restart”

MultiTiki3WindowsXP-4.PNG (171.67 Kb)

9. Create a local.php file for your TikiWiki-3.1/db directory.

In your TikiWiki install directory in this example, I renamed it “taf” and it resides in a directory I named “subdomains” , locate the “db” directory…


In the db directory, there may be a file named “local.php”. If so, open it for modification. If not, then created a file by that name and enter the following…

local.php for db directory
$user_tiki = 'root';
$pass_tiki = 'YourMySQLRootPassword';

if ($_SERVER["HTTP_HOST"] == "demo" || $_SERVER["HTTP_HOST"] == "www.demo") {
  $tikidomain = "demo.localhost";
  $dbs_tiki = "demo";
} elseif ($_SERVER["HTTP_HOST"] == "test" || $_SERVER["HTTP_HOST"] == "www.test") {
  $tikidomain = "test.localhost";
  $dbs_tiki = "test";
} elseif ($_SERVER["HTTP_HOST"] == "pilot" || $_SERVER["HTTP_HOST"] == "www.pilot") {
  $tikidomain = "pilot.localhost";
  $dbs_tiki = "pilot";

For a breakdown...

MultiTiki3WindowsXP-6.PNG (32.11 Kb)

10. In the “db” directory of your TikiWiki installation, create a new directory named after each of your subdomains.

In my example…


[Remember – “taf” is merely what I renamed my one-and-only TikiWiki-3.1 installation ]

11. In each of these directories, create a local.php file for each of your subdomains and corresponding databases…

MultiTiki3WindowsXP-7.PNG (11.34 Kb)

12. Start the installer for your first domain, by entering "http://<first_subdomain>.localhost/tiki-install.php" in the address bar.

Here I type in http://demo.localhost/tiki-install.php. In my example, “demo” was the name of one of my subdomains. The following screen should be displayed upon entering the installer address...

MultiTiki3WindowsXP-8.PNG (142.62 Kb)

This is important!

If things have gone well, you should see references to “MultiTiki” displayed in the box on the left-hand side of the browser.

Since I typed in the subdomain for demo, the “demo.localhost” is bolded where it says “DB OK”. This indicates that the install is targeted for the database defined for the “demo” subdomain. The installer will create several subdirectories for each subdomain, within your original TikiWiki installation directory or “taf” in my case. Run through these same install steps for each of your subdomains. Make sure that the given subdomain is “bolded” when doing the install for it.

MultiTiki3WindowsXP-9.PNG (169.09 Kb)

Do NOT lock the installer until after you have run it for your LAST subdomain.

On the last screen of the installer, you will be given the chance to enter your tikiwiki site with or without locking the installer. Choose NOT to lock the installer, until your have installed the tiki for your last subdomain.

If you mistakenly choose to lock the installer, merely delete the "lock" file found under the "db" directory of your MultiTiki code-base, and continue installing tiki for your remaining subdomains.

13. Other Procedures for Installing Multiple TikiWiki Instances

See also
  • TRIM - TikiWiki Remote Instance Manager

Related older pages

Contributors to this page: edmund .
Page last modified on Wednesday 05 August, 2009 01:45:32 CEST by edmund.


Site Language


These keywords serve as "hubs" for navigation within the Tiki documentation. They correspond to development keywords (bug reports and feature requests):

Tiki Newsletter

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other news!
Contribute to Tiki