The following instructions are for installing Movable Type 2.65 on a website hosted by DreamHost. However, I have been informed that these instructions also work fine for MT 3.121. I created the instructions from notes I took during what turned out to be a smooth, problem free install. If you have a suggestion for improving the notes, I would appreciate it if you would email me at robert AT wombatnation DOT com.

My original instructions for installing Movable Type 2.5 are still available, just in case.

Any text in bold should be replaced with your specific website domain name, database name, database user, database password, MovableType username, etc. Obviously, I did not really use hardtoguesspassword literally as my password, and neither should you.

Also, these notes assume you are using an ssh client to get shell access to your DreamHost server. That means your DreamHost user account must have been granted shell access, not just the default level of FTP access. If you need to grant shell access permissions to the DreamHost username that you are using, it will take about 15 minutes to take effect, so do it now! While you can install MT with just an FTP client, I think it is a lot more work and much more error prone. Learn to love the shell. See the Basic Shell Commands section below for a quick reference.

Create MySQL Subdomain, Database, and Database User

New MySQL domains and databases can take about an hour to become active on DreamHost, so do this step as early as possible. MySQL domains and databases are created in the MySQL control panel, in the "Goodies" section. MySQL domains are special; don't create your MySQL domain in the regular DreamHost domain control panel.

  1. Use the DreamHost MySQL control panel to add as a MySQL hostname. You don't have to use mysql as the sub-domain, but it's a common convention. Whatever domain name you do decide to use, be aware that it must be unique.
  2. Continue in the control panel to create a MySQL database. Give it a name you will remember, e.g., mtblogdb
  3. Create a new user, e.g., dbadmin, for this database.
  4. Give the dbadmin user a password - hardtoguesspassword

Download MT Installation File to Website

There are a lot of ways to do this. I did the following:

  1. Download MT-2.65-full-lib.tar.gz from to a local computer. This is the full version with libraries. Replace 2.65 here and below with the current version number.
  2. FTP MT-2.65-full-lib.tar.gz in binary mode from local computer to the directory on the DreamHost server

You could have transferred the files directly to your DreamHost server with wget. If you don't know what that means, forget I ever mentioned it. Or run man wget from the shell to find out more.

Unpack MT Install File

You can do some of the following on your local computer before uploading to your DreamHost server, but I think it is much easier to do this work on the server. While you can use Telnet instead of ssh to connect to your server, ssh is secure and just as easy to use. On Windows, I use PuTTY. On Mac OS X, I use Fugu. On Linux, I use ssh on the command line, as Linus intended.

  1. Connect to using ssh and cd into the directory
  2. tar xvzf MT-2.65-full-lib.tar.gz

Prepare Directories

These instructions assume you want to install MovableType into a new sub-directory called "mt" and you want your weblog's public homepage to be at

  1. mv MT-2.65-full-lib mt (this command just renames the directory the tar command above created)
  2. chmod 755 mt
  3. mkdir blog
  4. cd mt

Edit Main Config and Password File

I use emacs as my editor. Use whichever editor you know well. I added simplified emacs instructions in case you haven't used it before.

  1. emacs mt.cfg
  2. Change value of CGIPath to
  3. Below the line for CGIPath, add/set the following MySQL settings:
    • ObjectDriver DBI::mysql
    • Database mtblogdb
    • DBUser dbadmin
    • DBHost
  4. Uncomment the following lines in mt.cfg:
    • DBUmask 0022
    • HTMLUmask 0022
    • UploadUmask 0022
    • DirUmask 0022
  5. Press ctrl-x then press ctrl-s then press ctrl-x then press ctrl-c to save and exit emacs
  6. emacs mt-db-pass.cgi
  7. Change the password to the hardtoguesspassword you created earlier for dbadmin
  8. Press ctrl-x then press ctrl-s then press ctrl-x then press ctrl-c to save and exit emacs

Secure the Files

On my system's install of Emacs, the file you are editing is always backed up with the same name appended with a ~. For example, after editing and saving mt.cfg with Emacs, you will find an mt.cfg~ file in the directory. Use

rm *~

to delete these backup files. If you use a different editor, like vim, pico, or nano, make sure you delete the backup files from your server immediately.

Otherwise, anyone who knows your directory structure could request copies of the backup files with an appropriately, constructed URL, e.g., Normally, a cgi file will be executed on the server rather than sent back to the web browser as a file. However, a .cgi~ file looks an ordinary text file to the web server.

You can improve the security of your MT installation by protecting the mt.cfg file with a .htaccess file for the directory. This is explained in the Movable Type instructions.

  1. emacs .htaccess
  2. Type the following lines exactly as specified:
  3. <Files mt.cfg>
        <Limit GET>
        deny from all
  4. Press ctrl-x then press ctrl-s then press ctrl-x then press ctrl-c to save and exit emacs

Set Permissions

Permissions for the CGI files, except for mt-db-pass.cgi, should be set to read/write/execute for you and read/execute for group and other. The root directory for your blog should also be set to read/write/execute for you and read/execute for group and other.

  1. chmod 755 mt*.cgi
  2. chmod 600 mt-db-pass.cgi
  3. cd ..
  4. chmod 755 blog

Sanity Check of Perl Install

Load in a web browser to make sure your DreamHost server has the proper versions installed of the Perl modules that MovableType requires.

When I last checked (July 2003), DreamHost had everything installed with new enough versions. The CGI script also indicated that cgiwrap or suexec were probably installed. At the time, the version of Perl on my DreamHost server was 5.6.1, which is sufficient for MT 2.6x.

Init and Load Your New MT System

Load in a web browser to initialize the system. Newly created MySQL domains and databases usually take about an hour to become accessible on a DreamHost server, so you may have to wait a while before this step will work. When it does work, you should see something like:

Loading initial data into system...
Loading database schema...

    Loading weblog...
    Loading author...
    Loading permissions...
    Loading templates...
    Mapping templates to blog archive types...
        Mapping template ID '11' to 'Daily'
        Mapping template ID '11' to 'Weekly'
        Mapping template ID '11' to 'Monthly'
        Mapping template ID '12' to 'Category'
        Mapping template ID '13' to 'Individual'

Done loading initial data! All went well.

Now, go back to your ssh session, and delete the file, mt-load.cgi:

  1. cd mt
  2. rm mt-load.cgi

This is necessary to prevent you or someone else from re-initializing your system.


  1. Load in a web browser
  2. Log in as Melody with password Nelson
  3. Click Edit Your Profile and change Melody to the username you want to use.
  4. Save changes to the profile and login again with the new username.

If everything went as planned, you should now be able to administer and post to your Movable Type weblog.

Configure Your Weblog

On the Configuration page for your blog, note that the initial directory structure for your blog recommended by Movable Type in the Core Setup section may be incorrect. Even though it works for now, it could create problems for you in the future, so be sure to correct this if necessary.

This is what you may see in the Configuration section:


Delete the mysterious directory (it represents the name of a physical DreamHost server that may change in the future), so that the blog structure looks something like:


If you followed the above suggestions for directories, you should use something like the following for your core setup:


The first thing I almost always do is copy the text of the error message into Google or some other comprehensive search engine and search around to see if some other poor sap has run into the same problem. Then I search the Movable Type support forums.

In my experience of making lots of errors, having people email me questions about their own errors, and reading about other people's errors on the Movable Type and Gallery support forums, I have come to the conclusion that the top two installation mistakes for web-based software like MT are:

  1. File permissions set incorrectly
  2. Files transferred in binary mode instead of ASCII text mode

As for the first mistake, make sure you chmod all the CGI files, except mt-db-pass.cgi, in the mt directory to 755 (user read, write, execute -- group read, execute -- other read, execute). You should chmod mt-db-pass.cgi to 600 (user read, write), because it really isn't a CGI file. It contains your database password. As long as the web server process running the MT CGI script is executing under your username, those privileges will be sufficient. DreamHost servers are set up this way.

As for the second mistake, most FTP clients will default to binary mode or to auto mode. In auto mode, they try to guess the type of the file and then switch to the appropriate transfer mode. On Windows, the FTP clients usually make the guess based on the file extension. If the FTP client doesn't recognize the file extension, it goes with the default mode, which is usually binary. Since a lot of the Movable Type files have unusual extensions your FTP client will probably make a bunch of wrong guesses.

When uploading the compressed MT installation file file (the one ending in .gz or .zip), you should transfer the file in binary mode. If you are uploading the Movable Type files one at a time to your DreamHost server, you should transfer every file in ASCII text mode except for the gif files in the images directory and in the docs directory. Be sure to transfer mt.cfg in ASCII text mode.

Database Problems:

If you are getting errors related to connecting to the database, use phpMyAdmin to test the database username and password that you are using. DreamHost automatically sets up phpMyAdmin for you. They do so rock.

  1. Load in a web browser
  2. Log in as dbadmin with password hardtoguesspassword
  3. Under the column with the heading "MySQL", click on "Databases"
  4. Click on the name of your database
  5. Click the link that says "Drop" in each row

Make sure you use the same user name and password that you are using in mt-db-pass.cgi. I even recommend copying and pasting the text to make sure you are entering the exact same characters. If you can't login through phpMyAdmin, then you probably entered the wrong database connection info into mt-db-pass.cgi.

Another problem I hear about every now and then is someone getting the following error when running mt-load.cgi:

Bad ObjectDriver config: Connection error: Access denied for user: '[email protected]' (Using password: YES)

where username and server are replaced with appropriate values. I've never experienced this error, so I've never had a chance to debug it. Someone who did run into this problem managed to work around it by deleting and re-creating the user for the database. My best guess is that there is a typo in the username or password in mt-db-pass.cgi, but that's just a wild guess.

Basic Shell Commands

When you use ssh to connect to your server, you have what is called "shell access". Here are a couple of handy shell commands.


Thanks to everyone who has provided corrections or suggestions for improvements to these notes. The instructions are much better due to all of your contributions. Also, I appreciate all the kind emails I have received from people who have found these notes helpful. These notes are part of my payback to the Internet community for all the help I've received over the years due to other people being willing to post helpful instructions and answers on searchable websites.