Data Centers

Setting up your first Movable Type blog

Most bloggers start by signing up with a free service provider, but once you outgrow them you might want to try running your own blogware to give yourself greater control and flexibility. One of the more popular pieces of blogware is Movable Type, written in Perl. We'll show you how to install and publish your first Movable Type blog.

Blogging—the act of maintaining an online diary to record personal opinions on life and other irrelevance—has taken the Internet world by storm. Most users begin blogging by signing up with a free service provider; however, as they become more familiar with the activity and as their blog gains in popularity, the need for greater control or features leads them to install personal blogging software on their own Web server.

One of the more popular pieces of blogware is Movable Type. Developed by Six Apart, MT is a Perl application available as a free non-commercial version or a paid version that offers technical and installation support. Whichever version you use, it's easy to install, simple to learn, and rich in features for both dedicated and irregular bloggers.

Getting started

To get started with Movable Type, you'll need a Web server that allows you to execute CGI scripts written in Perl—ideally, with Perl 5.004_04 or better, with the default BerkeleyDB database for the content itself (MT supports MySQL and PostgreSQL as well).

Next, create directories named mt-web and mt-static under your Web server root for the content and static files respectively, and an mt-db directory outside the Web server root for the database files (as in the diagram below). Then upload all the CGI scripts included in the distribution to your server's CGI-BIN area. Remember to "chmod 755" the CGI scripts so that the server can execute them.

Once you're done with all this, you should have a directory tree that looks something like this:

|— cgi-bin
|       |— lib
|       |   |— MT
|       |— plugins
|       |— schemas
|       |— search_templates
|       |— tmpl
|           |— cms
|— htdocs
|    |— mt-web
|    |      |— myfirstblog
|    |— mt-static
|           |— docs
|           |— images
|— mt-db

All that's left is to configure MT with the file locations above. Locate the mt.cfg file in the CGI-BIN folder, and update the CGIPath, DataSource and StaticWebPath parameters. The CGIPath parameter specifies the location of the CGI scripts, the DataSource parameter controls the location of the database files, and the StaticWebPath holds the location of the static files. Here's an example of what these might look like, given the directory tree above:

DataSource /usr/local/apache/mt-db
StaticWebPath /mt-static/

At this point, you should run the included mt-check.cgi script in your browser to verify that all is working as it should. Then execute the mt-load.cgi script through your browser to initialize MT by loading templates, data, and author information into your blog. You can then delete the load script from the system, but as always, make sure you have made a backup copy just in case.

At this point, Movable Type is all loaded up and ready to begin accepting blogs and blog entries.

Publishing your MT blog

By default, Movable Type (MT) comes with one blog pre-installed, which you'll need to modify to your own settings. All blog configuration takes place through MT's administration module, accessible at the URL http://YOUR_HOST_HERE/cgi-bin/mt.cgi (obviously replace YOUR_HOST_HERE with the actual name of the Web server where you've got MT installed. To log in to the administration module, type the username "Melody" and password "Nelson", but change this immediately to close a serious security risk.

The default Weblog created by MT is called—not surprisingly—"first Weblog." You will want to change this name right away, so select the Manage Weblog option on the main menu and then select the Weblog Config option to reach the main configuration page for your blog. On this page, you have the opportunity to alter all the important parameters that affect the working of your blog. Here's a brief list:

  • Weblog name: The name of the blog
  • Local Site Path: The root directory for the blog. Example: /usr/local/apache/mt-web/myfirstblog
  • Site URL: The Web URL to the blog. Example:
  • Local Archive Path: MT can archive the files of your blog if you specify a location. Typically, you'd create a subdirectory under the blog root for this archive. Example: usr/local/apache/mt-web/myfirstblog/archives
  • Archive URL: The Web URL to access the archive area created above. Example:
  • Timezone: The time zone of the country where you are a resident. This is used to ensure that timestamps are accurately displayed.

Publishing blog entries

All that's left now is to actually populate your blog with some entries. Within the administration module, select the New Entry option to get a form containing the following fields:

  • Title: Provide the title for your blog entry.
  • Primary Category: You can associate each entry with more than one category.
  • Entry Body: This text is displayed on the main page of the blog, a synopsis of your blog post.
  • Extended Entry: This is the entire text of the blog entry.
  • Excerpt: Give a brief introduction to your blog entry, useful when syndicating your blog. If this is absent, the text in the Entry Body field is used as an excerpt.
  • Post Status: A blog entry may be in either Draft or Publish state. Only published entries will be available for display to readers.
  • Allow Comments: Since one of the nicer things about a blog is the two-way communication between author and readers, you can set, on a per-entry basis, whether users can post comments on your entry. This has three options: Open, which allows users to view and enter comments; Closed, which allows users to view comments only; and None, which does not permit views or posts.
  • TextFormatting: I recommend leaving this to Convert Line Breaks so that your entries are formatted correctly.
  • URLs to Ping: You can let interested users know every time your blog is updated, through various free services; this field allows you to specify the URL to use for these services. There are several service providers dedicated to this task, the most famous being the one at

Once you're done with all the fields, save your blog entry to the database and then use the Rebuild Site option to publish it to the Web. The first time you publish, you should probably use the Rebuild All Files option; for subsequent attempts, you can use any one of the other self-explanatory options: Rebuild Indexes Only, Rebuild Individual Archives Only, or Rebuild Monthly Archives Only.

Your new blog entry should now be viewable through your browser. Time to uncork the champagne and celebrate!

For more information, check out the online installation manual and user manual.

Editor's Picks

Free Newsletters, In your Inbox