Not a developer? Go to


Managing multiple instances of Movable Type from a single installation

Some hosting providers and large companies wish to host multiple instances of Movable Type from a single source base. Each of these instances will have its own dedicated database. This allows for:

  • easier maintenance across all instances of Movable Type
  • faster upgrades across the system because files only need to be updated in one place
  • simpler plugin management because plugins are installed in only one place

In this scenario, each instance of Movable Type has its own mt-config.cgi file which defines the specific configuration properties for each instance of MT, including the database connection info.

How It Works

Movable Type looks first for specific environment variables to instruct itself on where to look for its core source code and configuration file. These environment variables are:

  • MT_HOME - this environment variable needs to point to the directory that contains your mt.cgi file and is used for constructing the search paths for your lib and extlib directories that contain all of Movable Type’s core source code. If this is not defined, then Movable Type will use the current work directory as the MT_HOME value.
  • MT_CONFIG - this environment variable points to the specific fully qualified path to a Movable Type configuration file. If this is not defined, then Movable Type will use $MT_HOME/mt-config.cgi as the path to the MT config file.

Important Note: Movable Type requires that all mt-config.cgi files that you maintain for your various instances of MT be located in the same directory. This is due to the fact that Movable Type deduces certain paths on the file system based upon the location of the instance’s mt-config.cgi file.

Setting up Apache

A single instance of Apache can be used to host websites under an unlimited number of domains. This is achieved through the use of Apache “virtual hosts.”

Each virtual host can have its own independent configuration and environment for processing web requests allowing system administrators to control each domain separately.

Example Configuration

The following example makes use of the following assumptions:

  • Movable Type is installed in /var/www/shared/cgi-bin/mt
  • Two web sites, and need to make use of the same Movable Type install, but have a separate database for each.
  • These two web sites each have their Movable Type configuration file. These files are located in /var/www/shared/conf.

This example uses the Apache mod_env module to point each instance of Movable Type to the same shared instance of Movable Type, but to different configuration files for each instance.

<VirtualHost *:80>
    SetEnv MT_HOME /var/www/shared/cgi-bin/mt
    SetEnv MT_CONFIG /var/www/shared/conf/site1-mt-config.cgi
    ScriptAlias /cgi-bin/ /var/www/shared/cgi-bin/
    Alias /mt-static/ /var/www/shared/cgi-bin/mt-static/
<VirtualHost *:80>
    SetEnv MT_HOME /var/www/shared/cgi-bin/mt
    SetEnv MT_CONFIG /var/www/shared/conf/site2-mt-config.cgi
    ScriptAlias /cgi-bin/ /var/www/shared/cgi-bin/
    Alias /mt-static/ /var/www/shared/cgi-bin/mt/mt-static/

In the above example, Movable Type can be accessed at the following URLs:


See Also

Warning: Installing multiple instances of Movable Type may be in violation of your license, if you are an enterprise of commercial customer.



Shanx on February 6, 2008, 12:07 p.m. Reply

Hi. Please clarify what the “/path/to/mt” is. In a setting where each domain user (virtual host) is restricted to its own “/home” directory using Opendir protection for Apache for example, this may or may not be as straightfwd as it sounds in this manual entry.

Please advise with real world scenarios. For example:

  1. is my main root domain.

  2. and are my two domains running on the same Apache as root domain but as different virtual hosts.

  3. I install MT in

  4. Now how do I make it available from and


Byrne Reese

Byrne Reese on February 6, 2008, 12:47 p.m. Reply

The /path/to/mt path always refers to the fully qualified and absolute file path on your Web server where the mt.cgi file can be found. That is your MT_HOME directory. One way to determine what the path to this directory (when accessing your server via shell) is to navigate to the directory containing mt.cgi and to execute the command pwd. The output will show you to complete path to your current working directory. If you are using an FTP client, it to should be able to show you your current working directory. This path is a directory structure and usually starts with a “/”. on February 16, 2008, 6:49 a.m. Reply

Thanks Bryan. I guess my question was whether this MT_HOME has to be the host domain (in a dedicated server setting) or can it be any of the VirtualHost domains, so long as the paths are correctly specified?

My fear is that this recommended setup may not work with something like OpenDir protection, where VirtualHost1 is not allowed to navigate the directory of VirtualHost2 — as is customary in good stealth shared hosting environments.

As such, would we need to install MT in the root host folder, and then allow access from different domains? And if so, what’re the permissions/grants needed.

Possibly a silly question but hopefully relevant to many dedicated hosting providers.

Quinn Gittings on June 8, 2009, 9:07 p.m. Reply

How do I setup my MT blog to be accessible on my domain root? e.g. when you navigate to instead of

1001bonnesaffaires on October 14, 2012, 10:56 a.m. Reply

I want to create a development environment running Movable Type 5. To create a separate development environment, it is necessary to copy and paste to reflect production. How would I go about building a good environment?