I host this blog and the rest of the michaelhenley.co.uk domain on NearlyFreeSpeech and have yet to have a problem with them. However, while in California @alexmuller and @zethraeus were trying to set up the back end for MiscellanousGeekery, the tech blog which they are running, and at first decided to try to use MovableType instead of WordPress. After they spent a day getting nowhere at it they decided to go with WordPress instead and that was that. I had attempted to offer a helping hand while there, but being completely unfamiliar with MovableType and no sort of expert at configuring these things anyway I was about as much use as a chocolate teapot. This afternoon however, resolving not to be beaten by a piece of CMS Software, I decided to have a bash at it myself and see if I could make it work. After a few hours poking, proding, shouting and screaming, I finally managed to make it work.

Below is a step-by-step guide to how I made it install and run. I must preface this with saying that I am no sort of expert, nor do I claim to be. This is simply how it has worked for me and how it will hopefully work for you. Some things to note:

  1. I use a Mac and as such my main tools for interfacing with NFS are terminal SSH and Transmit. I will keep Transmit to a minimum to try to make this as universal as possible.
  2. The only configuring I will do is to install the blog.
  3. I found things a lot harder to approach than WordPress. While this is not surprising as WordPress is a little more dumbed down, this guide is the product of much Googling and I owe pretty much all of this to various guides, manuals, wikis and blogs. I will try to give credit where I can
  4. I am trying to make this as comprehensive as possible. Skip over any explanation you don’t need.
  5. Only enter commands in black. I am including the prompt in grey for clarity. The idea is that before you hit return to execute the command you should see exactly what is written on each line of the guide.
  6. This shouldn’t break anything, but if it does, please don’t sue me :) You are undertaking this at your own risk.

In your NearlyFreeSpeech control panel, create the site where you are going to install MovableType, and take note of the credentials you will require to connect to this site over SSH. If you are simply adding to an existing site then ignore this step.

Head over to movabletype.org and copy the URL to the latest distribution of MT (4.31 at time of writing). Open up the terminal and SSH into your site, and enter your NFS password when prompted:

ssh nfsusername_sitename@ssh.phx.nearlyfreespeech.net

You should then be presented with a prompt similar to this:

[sitename /home/public]$

From here you can download MT directly to the site using wget. Replace the URL with that obtained from the MT website for the latest release:

[sitename /home/public]$ wget http://www.movabletype.org/downloads/stable/MTOS-4.31-en.zip

You can follow the progress of the download on screen, and after a short while it will have downloaded. Next unzip it:

[sitename /home/public]$ unzip MTOS-4.31-en.zip

Once this is completed, if you enter the ls command at the prompt you should see that the public folder contains one file and one folder. The file is MTOS-4.31.en.zip, and the folder is simply MTOS-4.31-en. The folder contains the unzipped contents of file downloaded from MovableType.

Create a folder in public called cgi-bin, and then a folder called mt inside of it:

[sitename /home/public]$ mkdir cgi-bin

[sitename /home/public]$ cd cgi-bin

[sitename /home/public/cgi-bin]$ mkdir mt

[sitename /home/public/cgi-bin]$ cd ..

The contents of the MT download have to be split between the cgi-bin/mt folder and the public folder. At the prompt enter the following:

[sitename /home/public]$ cd MTOS-4.31-en

[sitename /home/public/MTOS-4.31-en]$ cp -rf mt-static ../

[sitename /home/public/MTOS-4.31-en]$ rm -r mt-static

[sitename /home/public/MTOS-4.31-en]$ cd ..

[sitename /home/public]$ cp -rf MTOS-4.31-en/* cgi-bin/mt

[sitename /home/public]$ rm -r MTO*

To summarise, these commands have copied the mt-static folder into the public directory of this site, and have copied the rest of the contents into the mt directory we created inside of cgi-bin. The final command is simply housekeeping to remove the downloaded zip file and the folder to which its contents were extracted.

One of the differences between MT and WordPress is that it requires the server to have the ability to write to certain folders. NearlyFreeSpeech limits how this can happen and so the permissions for the folders and files to be written must show the group as ‘web’ and allow the group to write. It also requires the blog to have its own subdirectory within the domain. I am going to assume that this directory will be ‘blog’, but if it is not then simply substitute ‘blog’ for your chosen name in any commands. Finally the world must also be able to execute files within cgi-bin/mt.

[sitename /home/public]$ mkdir blog

[sitename /home/public]$ chmod -R 775 blog

[sitename /home/public]$ chgrp -R web blog

[sitename /home/public]$ cd mt-static

[sitename /home/public/mt-static]$ chmod -R 775 support

[sitename /home/public/mt-static]$ chgrp -R web support

[sitename /home/public/mt-static]$ cd ..

[sitename /home/public]$ cd cgi-bin

[sitename /home/public/cgi-bin]$ chmod -R 775 mt

[sitename /home/public/cgi-bin]$ chgrp -R web mt

[sitename /home/public/cgi-bin]$ cd ..

At this point we should have completed pretty much everything which needs to be done in the terminal and via SSH. To disconnect from the server simply enter

[sitename /home/public]$ exit

This completes part 1. In the next part I will walk through how to configure your MovableType installation and set up MySQL database which it will use through phpMyAdmin. This can be found here.