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.
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.
There are a lot of ways to do this. I did the following:
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
from the shell to find out more.
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.
cdinto the domainname.com directory
tar xvzf MT-2.65-full-lib.tar.gz
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 www.domainname.com/blog.
mv MT-2.65-full-lib mt(this command just renames the directory the tar command above created)
chmod 755 mt
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.
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
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., http://www.domainname.com/mt/mt-db-pass.cgi~. 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.
<Files mt.cfg> <Limit GET> deny from all </Limit> </Files>
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.
chmod 755 mt*.cgi
chmod 600 mt-db-pass.cgi
chmod 755 blog
http://www.domainname.com/mt/mt-check.cgi in a web browser to
make sure your DreamHost server has the proper versions installed of the Perl modules that
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.
http://www.domainname.com/mt/mt-load.cgi 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:
This is necessary to prevent you or someone else from re-initializing your system.
http://www.domainname.com/mt/mt.cgiin a web browser
If everything went as planned, you should now be able to administer and post to your Movable Type 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:
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.
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.
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@example.com' (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.
When you use ssh to connect to your server, you have what is called "shell access". Here are a couple of handy shell commands.
cd dir[Changes working directory to the directory named "dir"]
cd ..[Change working directory to the parent directory of the current directory]
cp sourcefile copiedfile[Copies the file "sourcefile" to the new file "copiedfile"]
cp * dir[Copies all the files in the current directory to the directory named dir
ls[List files in the current directory]
ls -al[List all files (includes hidden files, such as .htaccess) in long format]
ls dir[List the files in the directory named dir]
mv sourcefile dir[Moves sourcefile to the directory dir]
mv sourcefile newfile[Renames sourcefile to newfile]
pwd[Print Working Directory; it tells you where you are]
rm filetodelete[Removes the file named filetodelete]
rm -i filetodelete[Interactive remove; prompts you before deleting the file
rm *~[Removes all files in the current directory with a name ending with a ~]
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.