The Ultimate Guide to Installing Movable Type Plugins

Without a doubt the most common support request I receive from users of my many Movable Type plugins is around installation. If you are having difficulty or getting frustrated the first and most important thing to realize is that it is not your fault. Not in the slightest. The problem lies in having poor documentation which exists because plugin authors, like me, take plugin installation for granted. As a result our instructions, while well intentioned, are sometimes not sufficient for all users.

So permit me to try to explain how to install a Movable Type plugin once and for all and in a way that I hope will be useful and understandable by the largest possible number of people.

Before You Begin

First off, these instructions assume that you are installing a plugin that adheres to the documented best practices for plugin packaging. To determine if the plugin you are installing adheres to this standard you will need to unzip the plugin on your local computer, which should create a new folder containing all of the files needed to run the plugin. Look inside this folder, if it contains another folder called plugins then you are in luck. If not, then this guide will be of little use to you. I would encourage you to contact the plugin author and ask them to please repackage their plugin according to the documented standard, or point them to me so I can help them.

Your $MT_HOME and $MT_STATIC Directories

You are clearly on the right track. Now, another thing you need to know is that these instructions make frequent reference to your "$MT_HOME" and "$MT_STATIC" directories. The location of these directories will be different for virtually everyone; what is important is knowing where these directories are for you.

The $MT_HOME directory is a cgi-bin directory where you have the Movable Type application installed. Let's look at this common example: suppose you have installed Movable Type into the following directory:

/var/www/cgi-bin/mt

We know that this is the right directory because if you view its contents you will find within it a file called mt.cgi like so:

/var/www/cgi-bin/mt/mt.cgi

This is your $MT_HOME directory.

Now, your $MT_STATIC directory is where you will find Movable Type's static files. Like with Movable Type itself, you may1 need to place the plugin's static files outside of your $MT_HOME directory into a "web accessible" directory. You will know this is the case for you if you access Movable Type from a URL like:

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

And your images are served from a URL like:

http://foo.com/mt-static/images/movable-type-logo.gif

Alternatively, your system may be configured such that static files can be served directly from your cgi-bin directory like so:

http://foo.com/cgi-bin/mt/mt-static/images/movable-type-logo.gif

Knowing how your system is configured to serve static files is essential to a successful plugin installation. To find your $MT_STATIC directory, find on your system a file called mt.js. Let's suppose that your system tells you that mt.js can be found in:

/var/www/htdocs/mt-static/mt.js

Then your $MT_STATIC directory is:

/var/www/htdocs/mt-static/

If your system finds more than one copy of mt.js you will need to do some sleuthing to figure out which one of these directories is in use by Movable Type. Hint: consult your mt-config.cgi file; in it might be a configuration parameter that will indicate the proper path to the directory in question.

Now, let's proceed with your installation.

Installing via the Command Line (Unix)

If you are at all familiar with using the command line, then this is without a doubt, the quickest and most straightforward solution to plugin installation:

prompt> unzip SomePlugin-1.3.zip
prompt> cp -a SomePlugin-1.3/* $MT_HOME/

This will copy all of your files into the appropriate directories, including the plugin's cgi scripts, and Perl library files and sometimes even its PHP files needed to support dynamic publishing2.

And optionally, if the plugin has an mt-static folder and your system requires you to install static files into a different directory than your $MT_HOME:

prompt> cp -a SomePlugin-1.3/mt-static/* $MT_STATIC/

Installing via the Command Line (Mac OS X)

Installing a plugin on a Mac is almost identical to installing on in Unix. The only difference really is the cp command used since cp -a is not supported. So the command sequence becomes:

prompt> unzip SomePlugin-1.3.zip
prompt> cp -pR SomePlugin-1.3/* $MT_HOME/

This will copy all of your files into the appropriate directories, including the plugin's cgi scripts, and Perl library files and sometimes even its PHP files needed to support dynamic publishing2.

And optionally, if the plugin has an mt-static folder and your system requires you to install static files into a different directory than your $MT_HOME:

prompt> cp -pR SomePlugin-1.3/mt-static/* $MT_STATIC/

Installing via FTP

If you are installing the plugin via FTP, then the instructions are similar as to the above, but you will be installing the plugin by dragging and dropping files around. Whee! Of course, your exact instructions may vary depending upon the FTP software you use, but the general gist is the same no matter what. Let's take a look:

  1. Unzip the plugin's zip file to your desktop.

  2. Start your FTP client and connect to your web server.

  3. In your FTP client navigate to your $MT_HOME directory.

  4. Select all of the files found in the folder created when you unzipped the plugin's archive and drag and drop them directly into your $MT_HOME directory in your FTP client. Wait for all of the files to be copies.

  5. In your FTP client navigate to your $MT_STATIC directory.

  6. Select all of the files found in the mt-static folder found in the folder created when you unzipped the plugin's archive and drag and drop them directly into your $MT_STATIC directory in your FTP client. Wait for all of the files to be copies.

And you are finished. Granted, textual instructions like that can sometimes not be very intuitive, so check out the screencast below which demonstrates the instructions above more precisely:


Movable Type Plugin Installation Demo from Byrne Reese on Vimeo.

And that's it. Hopefully this will answer the questions most people have about installing Movable Type plugins. If you have trouble installing one, drop me a note and I will try to help.

1 - You may or may not need to perform this extra step, which depends exclusively upon how your web server has been setup. As for me, I prefer to configure my web server such that I can serve images and javascript file (static files) from my cgi-bin directory.

2 - Some plugins come with a set of PHP files that are used by Movable Type's dynamic publishing system. These files should get installed into your `MT_HOME/php` directory, and *not* into your mt-static directory. But if you follow the instructions in this document, you shouldn't have to worry about this.

Recommended Entries



Close