Not a developer? Go to MovableType.com

Documentation

File System

This guide describes the files and directories in a typical Movable Type installation.

File System Tour

Directories in Movable Type each have a specific purpose and contain all the files necessary for that purpose. Here we will explain each of these specific directories.

Each hosting provider sets up their system differently and names the various directories based upon their preference, but the general organization is the same. Here is a sample file structure with notes regarding files and directores important for installation:

www/                                <-- Site Directory (may be the same as the user directory if single-site account)
    cgi-bin/                        <-- "cgi-bin" executeable files directory
        mt/                         <-- MT Application Directory or $MT_HOME
            addons/                 <-- Addons directory
            alt-tmpl/
            default_templates/
            extlib/
            import/
            index.html
            lib/
            mt-add-notify.cgi
            mt-atom.cgi
            mt-check.cgi
            mt-comments.cgi
            mt-config.cgi           <-- mt-config.cgi
            mt-config.cgi-original
            mt-cp.cgi
            mt-feed.cgi
            mt-ftsearch.cgi
            mt-search.cgi
            mt-static/              <-- MT Static Directory (moved to web root if necessary, see in web root)
            mt-tb.cgi
            mt-testbg.cgi
            mt-upgrade.cgi
            mt-wizard.cgi
            mt-xmlrpc.cgi
            mt.cgi
            php/
            plugins/                <-- Plugins Directory
            readme.html
            search_templates/
            themes                  <-- Themes Directory
            tmpl/
            tools/
    html/                           <-- Web Root (or Site Root, if publishing directly to the web root. Could also be the "Website Root")
        blog/                       <-- Blog Directory or "Blog Root"
        index.html                  <-- homepage of the website
        mt-static/                  <-- MT Static Directory
            addons/                 <-- Addons Static Directory
            codepress/
            css/
            flash/
            htc/
            html/
            images/
            index.html
            jquery/
            js/
            mt.js
            plugins/                <-- Plugins Static Directory
            readme/
            styles.css
            styles_de.css
            styles_es.css
            styles_fr.css
            styles_ja.css
            styles_nl.css
            support/                <-- MT Static Support (MT places userpics and cache files here. Must be writeable.)
            themes/
            themes-base/

Web Root Directory

The webroot directory contains the homepage of the website. This directory is where the mt-static directory will be placed (or where it will be aliased to unless stati files can be served from cgi-bin directory).

File path to the web root directory is similar to one of the following:

/var/www/html/
/home/USERNAME/www.example.com/html/

cgi-bin Directory

where cgi scripts are executable. This directory is usually named cgi-bin, but may be CGI-BIN or cgi. If this directory doesn't exist as a sibling or child of the web root directory, ask you hosting provider for the location.

File path to the cgi-bin directory is similar to one of the following:

/var/www/cgi-bin/
/home/USERNAME/www.example.com/cgi-bin/

Application Directory

aka $MT_HOME

Throughout this guide $MT_HOME is used to refer to the Application Directory, the directory where Movable Type is installed. The application directory is often named as "mt", but may be named with the version and language like "MT-5.0-en". In the mt-config.cgi configuration file it will be the value of the CGIPath config directive.

File path to the application directory is similar to one of the following:

/var/www/cgi-bin/mt/
/home/USERNAME/www.example.com/cgi-bin/mt/

The application directory is the directory which contains the mt.cgi script:

http://www.example.com/cgi-bin/mt/mt.cgi

Static Directory

aka $MT_STATIC

Throughout this guide $MT_STATIC is used to refer to the Static Directory. This directory is named mt-static. This directory is where static files such as images, css, and javascript which are used by the Movable Type application and some blog functionality. Static files for plugins are also placed in the plugins subdirectory of this directory.

This directory may be in one of a few places, typically the application directory or the web root.

Tip: See the value of the StaticWebPath directive (or StaticFilePath if used) in the mt-config.cgi file to determine the location.

File path to the static directory is similar to one of the following:

/var/www/html/mt-static/
/home/USERNAME/www.example.com/html/mt-static/

The url to this directory is typically:

http://www.example.com/mt-static/

To confirm you have found the correct directory, look for the mt.js file in the $MT_STATIC directory:

http://www.example.com/mt-static/mt.js

Static Support Directory

Movable Type places userpics and other files in this directory.

File path to the static support directory (located in the Static Directory) is similar to one of the following:

/var/www/html/mt-static/support/
/home/USERNAME/www.example.com/html/mt-static/support/

The url to this directory is typically:

http://www.example.com/mt-static/support/

Themes Directory

Themes for Movable Type are placed or exported to this directory.

File path to the themes directory (located in the Application Directory) is similar to one of the following:

/var/www/cgi-bin/mt/themes/
/home/USERNAME/www.example.com/cgi-bin/mt/themes/

The url to this directory is typically:

http://www.example.com/cgi-bin/mt/plugins/

Plugins Directory

File path to the plugins directory (located in the Application Directory) is similar to one of the following:

/var/www/cgi-bin/mt/plugins/
/home/USERNAME/www.example.com/cgi-bin/mt/plugins/

The url to this directory is typically:

http://www.example.com/cgi-bin/mt/plugins/

Plugins Static Directory

File path to the plugins static directory (located in the Static Directory) is similar to one of the following:

/var/www/html/mt-static/plugins/
/home/USERNAME/www.example.com/html/mt-static/plugins/

The url to this directory is typically:

http://www.example.com/mt-static/plugins/

Addons Directory

File path to the addons directory (located in the Application Directory) is similar to one of the following:

/var/www/cgi-bin/mt/addons/
/home/USERNAME/www.example.com/cgi-bin/mt/addons/

The url to this directory is typically:

http://www.example.com/cgi-bin/mt/addons/

Addons Static Directory

File path to the addons static directory (located in the Static Directory) is similar to one of the following:

/var/www/html/mt-static/addons/
/home/USERNAME/www.example.com/html/mt-static/addons/

The url to this directory is typically:

http://www.example.com/mt-static/addons/

Symlinking to the Application Directory

A symlink can be created to point "mt" to the current application directory in the cgi-bin so that Movable Type can be accessed without the version number in the URL:.

http://domain.com/cgi-bin/mt/mt.cgi

Instead of the versioned URL (or "in addition to" because the actual directories can still be accessed):

http://domain.com/cgi-bin/MT-5.0-en/mt.cgi

With this synlink (or alias) users won't have to to access a new url and the application directory name doesn't have to be changed from the version name it came with which helps to more easily know which version of MT is installed without viewing the footer while logged into MT. Also mt-config.cgi files won't need to be updated with new CGIPath and StaticWebPath variables.

For the following directory structure:

cgi-bin/
    mt -> MT-4.32-en
    MT-4.32-en
    MT-5.0-en

This command will remove the current "mt" symlink and then create a new symlink:

rm mt; ln -s MT-5.0-en mt

Blog and Website Directories

This is the directory in which the website or blog is published, one exists for each blog or website published.

This directory is the value used for the "Website Root" or "Blog Root" setting on the "General Settings" (MT5) or "Publishing Settings" (MT5) screen.

Blog directories are often sub-directories of website directories or other blog directories.

Back

2 Comments

Violet

Violet on January 12, 2010, 9:38 a.m. Reply

Under the Themes Directory section, there’s this statement:

The url to this directory is typically:

 http://www.domain.com/cgi-bin/mt/plugins/

Shouldn’t the last statement read as follows?

 http://www.domain.com/cgi-bin/mt/themes/
Violet

Violet on January 12, 2010, 9:57 a.m. Reply

One more thought — Shouldn’t you also list a Themes Static Directory in much the same way as you list a Plugins Static Directory and an Addons Static Directory?

And identify the folder path and url for it, as well?

Leave a Comment