The Movable Type User Manual

NOTE: This documentation is for Movable Type 3.2. If you are using a newer version, please see the documentation for Movable type 3.3x or Movable Type Enterprise.

Up | 2: Getting Started »

Chapter 1: Installation and Upgrade

In this section:


Movable Type is the premier weblog publishing platform for businesses, organizations, developers, and web designers. Powerful customization gives you control over everything you publish and the elegant interface keeps things simple and clear.

Features

  • Unlimited Blogging

    Movable Type offers the ability to publish an unlimited number of blogs quickly and easily through a single installation of the application. And the platform supports posting by as many authors as you need, with no limit on the numbers of entries, comments, or TrackBacks the system supports.

  • Powerful management features

    Movable Type offers a unique set of administration features designed to increase manageability of the system and to require the minimum amount of maintenance possible. Administrators can set detailed permissions for any user who interacts with the system, and those in charge of content can easily perform bulk actions on items across all the blogs on the system.

  • Template-based custom output

    Combine Movable Type's template tags with standard HTML, or your markup language of choice, to build and customize your site. You can integrate with your existing website design and create custom output formats.

  • Flexible static and dynamic PHP publishing

    Choose between static page generation or dynamic pages to optimize your weblog performance on a per-template basis. Turn on static page generation for frequently-requested pages, such as site index and feeds, and use dynamic pages for your archives. Dynamic pages completely eliminate the need to manually rebuild your files. Now you can maintain the best balance of fast rebuilds and low server load.

  • Flexible Archiving

    Archive by individual post, post category, or date. Monthly and weekly archives are standard, and you can choose any number of additional archive types as well.

  • Community interaction through comments and TrackBack

    Movable Type helps people connect to your weblog and to each other. You can let readers respond to individual weblog posts and manage content submitted through comments and TrackBack. And the powerful feedback system in Movable Type allows you to control permissions on comments, including support for registered comments. TrackBack was invented by the Movable Type team, so support for TrackBack has always been first-class on the platform.

  • Clean, powerful interface

    The Movable Type user interface is easy for new users to learn and affords advanced users power and control. You can also customize the interface to suit your needs.

  • Localization and Internationalization

    Movable Type ships with full support for Unicode and international character sets. Official, fully-supported versions with translated documentation are now available in Japanese, French, German, Spanish, and Dutch.

    Movable Type also has an open and documented internationalization and localization framework that allows you to create your own translations or take advantage of community-contributed translations for unofficial support of many additional languages.

  • Programming Interfaces

    Movable Type supports the Atom API (application programming interface) and Metaweblog API, allowing dozens of third-party clients and devices to post data to the system.

  • Syndication

    All common data syndication formats are supported by Movable Type's default templates, including XML formats like RSS and Atom. Other custom formats can be created through the use of Movable Type's template tags.

  • Platform Support

    Movable Type's broad platform support for various operating systems and web servers simplifies integration with any web services platform.

  • Powerful plug-in architecture

    Movable Type features an extensible plug-in system. It allows even non-technical users to extend Movable Type's native functionality and eases integration with other technologies. Hundreds of plugins exist and are either available for free or at low cost through the Movable Type Plugin Directory.

  • Editable object-oriented Perl source code

    Movable Type's clean, well-documented source code is written in Perl, one of the most popular scripting languages, and is completely customizable by thousands of developers around the world.

  • World-class support

    Six Apart's support team offers online help ticket support for our platforms and has earned raves from customers for its responsiveness and prompt, knowledgeable answers.

  • The backing of a Professional Network

    In addition to expert support, the Six Apart Professional Network is a community of thousands of consultants, developers, designers, systems integrators, and IT professionals around the world who work with blogs for a living. This makes it easy to find someone to assist in a Movable Type deployment or customization, or to talk to peers and share best practices on using Movable Type within your organization.

What You Need

Here is what you will need to set up and use Movable Type:

  • A Web (HTTP) server that can run Perl CGI (Common Gateway Interface) scripts and optionally PHP scripts.

    Movable Type resides in one centralized location (the server) and is accessed by users through HTML pages viewed in a standard browser. It is written in the Perl programming language and can optionally produce dynamic content using PHP. The application itself is approximately eight megabytes in size and it is recommended that you have at least an additional 25 megabytes of storage for posts.

    Perl, PHP and web servers such as Apache HTTP Server are available for Unix-style operating systems such as Linux, BSDs and Mac OS X in addition to Windows. They are also freely available and offered by most Internet Service Providers (ISPs) today.

  • An FTP client or a shell (telnet or SSH) account.

    An FTP (file transfer protocol) program to send the files from your computer to your server. If you need an FTP program, there are many available for free. (SmartFTP is a good FTP program for Windows, and offers a free trial version. Transmit is a good FTP program for Mac users on OS X, and it has a free trial, too.)

    Advanced users with SSH or Telnet access can use the command-line tools they are familiar with for transferring files and configuring the system.

  • A modern web browser with JavaScript enabled.

    Movable Type uses a browser-based interface to access all of its functionality. This eliminates the need for additional software to be installed or maintained by each user of the system. We recommend using the latest version of the Firefox browser for best results. It is freely available at http://www.mozilla.org/products/firefox/

System Requirements

  • Perl version 5.004_05 or greater is required. Version 5.6.1 or above is recommended.

    Perl runs on a wide variety of platforms and has been a mainstay in Internet development for over a decade. While Movable Type will run on any platform that supports Perl version 5.004_05, we recommend using version 5.6.1 or greater for optimal results.

  • Either Berkeley DB, MySQL, SQLite or PostgreSQL for data storage.

    Movable Type supports a number of common open source database options, providing users with the flexibility to select a data storage option that best fits their environment. MySQL is the commonly recommended choice.

  • External (CPAN) Perl Modules

    Movable Type builds on the extensive open source foundation of the Perl community by utilizing external Perl modules. These modules are freely available open source software that can be obtained from the Comprehensive Perl Archive Network (CPAN) at http://search.cpan.org/.

    Movable Type requires the follow Perl modules to operate.

    • CGI version 2.8 or greater
    • HTML::Template version 2.0 or greater
    • File::Spec version 0.8 or greater
    • Image::Size

    You are also required to have at least one of the following database modules.

    • DB_File
    • DBD::mysql
    • DBD::SQLite
    • DBD::Pg

    Movable Type's capabilities can be further enhanced with the presence of several other Perl modules that support optional features.

    • HTML::Entities
    • File::Temp
    • Storable
    • LWP
    • SOAP::Lite version 0.5 or greater
    • XML::Atom
    • Crypt::DSA
    • MIME::Base64
    • Image::Magick

    Movable Type ships with all required and optional modules that do not require compilation for your specific platform.

  • PHP 4.0.6 or greater along with the Smarty Template Engine and ezSQL libraries.

    Movable Type provides optional support for the dynamic publishing of weblog content using PHP in addition to the Smarty Template Engine and ezSQL libraries.

    Dynamic publishing is not supported with Berkeley DB.

Selecting a Web Host

Choosing an appropriate server to host the Movable Type system is essential for optimal performance. While meeting the baseline requirements will get the application up and running, having access to the optional libraries and server resources allows you to get the most from the system with the least amount of effort.

Movable Type can be run with virtually any version of Perl 5; however Perl 5.6.1 or greater is recommended. The later versions of the programming language provide gains in performance and provide better international character handling than prior versions.

The host should also support one or more of the SQL database options -- MySQL, SQLite or PostgreSQL. (MySQL and PostgreSQL can actually be hosted on a separate server.) SQL databases are significantly faster. Berkeley DB support is provided because of its near-universal availability; however, this option is not always as reliable as the other databases listed and we strongly recommend the use of one of the other database options.

Your host should also provide full FTP access at a minimum and shell (Telnet or SSH) access can be valuable. Shell access can provide more flexibility and options for experienced users who are familiar with basic Unix-style environments.

The host should have all of the required modules and preferably many of the optional modules pre-installed. One of the most difficult issues users will grapple with is the installation of external Perl modules. To lessen the burden on users, Movable Type includes all required and optional modules which do not require compilation. That being said, there are some modules that require some of their code to be compiled for specific operating systems and processors. This task requires shell access and some advanced technical knowledge, and some ISPs even restrict compilation on their servers for security purposes. For this reason, we recommend using a host in which these modules are already present and periodically maintained by the host.

Access to cron or similar services for periodically running scheduled tasks on the server is very useful. Movable Type's scheduled posting functionality requires this support in order to publish future entries automatically as needed. Facilities such as cron can also be required by popular utilities and plugins that perform administrative tasks such as closing comments after a certain period of time.

Six Apart works with several hosting partners who provide these system resources and more to their subscribers. For a list of hosting partners and more information about the program go to http://www.sixapart.com/partners/current.

Problem

You are trying to determine whether Movable Type or TypePad is right for you.

Solution

Decide what is most important to you: simplicity or control.

Discussion

TypePad is a complement to Movable Type, not a replacement. The two tools share a common core designed to address the needs of users with different requirements and capabilities. So, the question that will often be asked is, which is right the tool to use, Movable Type or TypePad? The answer comes down to simplicity vs. control. TypePad's centralized design and focus on simplicity offers the perfect complement to Movable Type's powerful feature set.

Movable Type provides you access to the code of the application and the database with unlimited, system-wide configuration options. With this access and a bit of know-how, much of which is covered in this manual, Movable Type users (or developers) can extend the system with plugins, administrative scripts and add-on applications. Movable Type's open architecture, combined with the many open source tools and standards that underpin its design, is so rich that it can be adapted to any number of publishing applications, transcending traditional weblogging.

Movable Type also provides features that are not available in TypePad: robust manageability of multiple weblogs, email notifications, sending of entries by email, connections to Google's search API, and built-in weblog search.

Publishers such as Gawker Media, the New York Times' About.com and O'Reilly's Make Magazine use Movable Type to meet their needs for a high level of integration and customization. Business and enterprise users with similar requirements can benefit from installing the software on their own servers, allowing them to deploy weblogging capabilities on their firewall-protected intranet to monitor its content, security, and access. And if you're just a geek like us and enjoy tinkering with technology and developing code, Movable Type is a great platform for creating cool hacks.

TypePad combines hosting and publishing tools into one configured packaged, avoiding the need to install, configure, manage, and upgrade software or a server. TypePad also features a built-in visual template builder to choose which pieces of information to display on a page, allowing the user to drag and drop them within the application and rearrange them on the page in such a way that even a novice can publish a weblog built with valid XHTML and CSS. Additionally, the service includes the pre-integration of syndication services, publishing interfaces, Amazon links and moblogging.

The sum of these parts removes most of the technical burden and hassle, making it easy for those who don't have the time or expertise to get started publishing their thoughts and information on the Internet. In a sense, TypePad represents what weblogging is about in general, a level playing field for information, a sort of democratization of publishing.

TypePad is a one-size-fits-all tool with the ability to support users with experience levels ranging from novice to expert and broken down into three tiers: Basic, Plus or Pro.

TypePad Basic is for those starting out with their first weblog who want to get up and running as quickly as possible but still be able to choose a design that suits their personality. Basic provides exactly that, offering the ability to select a look, make posts, display images, enable comments, and assign posts to categories.

TypePad Plus gives you a bit more control if you're comfortable with weblogs but not interested in managing technical details. Plus allows for up to three weblogs on an account and comes with all the features of Basic. It also gives users the ability to create photo albums, password protect any or all of the weblogs and photo albums, create custom site designs, map domain names, engage in moblogging, and schedule posts to appear in the future or date them to the past.

TypePad Pro is the option for experts and power users. Pro is the right choice for group weblogs or advanced users who have experience in weblogs and web technology. With Pro users can create an unlimited number of weblogs and directly edit the HTML to control their weblogs and photo albums down to the letter. Pro allows users to invite other authors to contribute as well as the ability to archive entries in multiple formats.

Problem

You need to find out where the Perl interpreter resides on your system.

Solution

Your hosting provider may have provided you with the location of the Perl interpreter in the introductory email or welcome message you received when you created your account. Most of the time, this will be something like /usr/bin/perl. If you're unsure, ask your hosting service or system administrator. And if you have shell access you can use the whereis command.

Discussion

The Movable Type software is written in the Perl programming language. In order for Perl to process any code, the first line of script must contain the location of the Perl interpreter. Depending on your system configuration, you may have to specify its location in order for any of the Movable Type scripts to run.

To determine the location of Perl on your web server, consult with your hosting service or system administrator. Alternately, if you have command line access, and are familiar with its use, you can log in to that account and type:

 $ whereis perl

This will give you the location(s) of Perl on your system. Typically the interpreter is found at /usr/bin/perl, the MT default location. If it isn't there, the following files must be modified:

  • mt.cgi
  • mt-add-notify.cgi
  • mt-atom.cgi
  • mt-check.cgi
  • mt-comments.cgi
  • mt-db2sql.cgi
  • mt-search.cgi
  • mt-send-entry.cgi
  • mt-tb.cgi
  • mt-xmlrpc.cgi
  • mt-upgrade.cgi
  • mt-view.cgi

Despite its extension, mt-config.cgi is not a typical Perl script, so it should not contain the path to Perl.

Open each file in a text editor and change the first line from:

 #!/usr/bin/perl -w

to the location of the Perl interpreter in your system. For example:

 #!/usr/local/bin/perl -w

Take care not to remove the -w at the end of the first line in each file. This setting turns on warnings in Perl and is necessary for Movable Type's operation.

Problem

You want to install the Movable Type software using FTP.

Solution

Download an FTP application, uncompress the software onto your desktop and take care of any necessary configuration before uploading.

Discussion

  1. An FTP (file transfer protocol) program is used to send the files from your computer to your server. If you don't yet have an FTP program, there are many available for free. SmartFTP is a good FTP program for Windows, and offers a free trial version. Transmit is a good FTP program for Mac users on OS X, and it has a free trial, too.
  2. Download and unpack the software.

    Download the latest distribution file (either when selecting a license from the Pricing page or from Your Account after it has been created). The .zip download is the best choice for Windows users and the .tar.gz is great for Unix command-line installations. You can always log in to your account to get another copy when you need it.

    Double-click on the downloaded archive to uncompress it. Most modern computers have this functionality built in, but if you're using an old operating system, you may need additional software to uncompress the Movable Type archive, such as Winzip (Windows) or Stuffit Deluxe/Expander (Mac).

    With the software downloaded and uncompressed on your computer, you should take the time to configure the system locally, since it will be easier to work with. See Configuring the System to complete this important step.

  3. Upload the software using your FTP software.

    Installing MT in your web root directory: We recommend that you do not install Movable Type in your web documents root directory. This can cause security issues in some configurations, and can lead to confusion or complexity when publishing.

    If you must install Movable Type in your web documents directory, it is best to install it in a subdirectory dedicated to the application files (e.g. /mt). This setup avoids all configuration and security issues.

    Open a FTP connection to your server and move to a directory such as cgi-bin where scripts can be run by the web server. It is recommended that you install the system in a subdirectory such as cgi-bin/mt to make future management easier. If this directory does not exist, create it and then open it. You are now ready to upload the software.

    The files should be uploaded in ASCII mode except for the mt-static/images directory which should be uploaded in BINARY mode. Many FTP clients will correctly upload files without you selecting the type of upload, but these guidelines may be useful as "automatic" mode does not always work properly.

    Uploading files in the wrong mode will corrupt the files in transit and the system will not work. This is the leading cause of installation/upgrade woes.

    It is highly recommended that the Movable Type static files (found in the mt-static directory of the uncompresed archive) be stored separately from any scripts directories. On some systems this is not even an option -- it is required. (See knowledge base article "Images and Styles Do Not Show Up" for further explanation of this problem.) Most people place this directory in the web documents root directory so that they can be accessed from http://www.example.com/mt-static/.

  4. Set Permissions of Scripts.

    All application scripts (files ending with the .cgi extension) must have Read and Execute permissions; Most servers list this permission numerically as 755, but it might also be listed as -rwxr-xr-x

    Also, if you created a folder to house all of the Movable Type application files (e.g. cgi-bin/mt or DOCUMENT_ROOT/mt) you should ensure that its permissions are also set as described above (also 755).

    Most FTP programs provide a graphical interface for setting permissions which simplifies this task.

  5. Verify the System Requirements.

    At this time you can verify your system requirements by running the mt-check.cgi script in your browser. (If this script runs, the installation has gone well so far.) Consult Verifying System Requirements for more on this step.

  6. SQLite/BerkeleyDB users: Create a database directory

    If you are using a file-based database option such as SQLite or Berkeley DB, you should also create a directory to contain your database file(s) (e.g. /db). For security reasons and to make future upgrades easier, it's best if this directory resides outside of your Movable Type application and root web directory. Many users place their database directory in the home or top-level directory of their user account.

With the software residing on your server, and configured, you are now ready for Initializing the System.

Problem

You want to install the Movable Type software and have command-line (shell) access to the server.

Solution

Transfer the latest Movable Type distribution file to your server and unpack it into your CGI directory.

Discussion

  • Unpack the software.

    Download the latest Movable Type distribution file and transfer it to your server. Unpack the software into your web server CGI directory. For example, if you had downloaded Movable Type 3.2 US english distribution with the CGI directory as your present working directory, you could use this command to unpack it:

     tar xvfz /path/to/dist/like/MT-3.2-en_US.tar.gz

    The archive will create a like-named subdirectory such as MT-3.2-en_US. It is recommended that you leave the system in its own subdirectory to make future management easier. Simply rename the created directory to something shorter and more memorable such as mt. You can can do this with a command like:

     mv -f MT-3.2-en_US mt

    It is highly recommended that static system files be stored somewhere outside of any scripts directories. On some systems this is not even an option -- it is required. The static system files are contained in the mt-static directory.

    Do not install Movable Type in your web documents root directory. This can lead to complications when publishing and can result in less security in some hosting environments.

  • Configure

    At this time you will need to configure the system as discussed in Configuring the System.

  • Check Permissions of Scripts.

    All scripts (files ending with the .cgi extension) must have Read and Execute permission for all users in order to run properly. The owner of these files should be granted additional Write permissions. You would use this command to set the proper permissions:

     chmod 755 *.cgi
  • Verify the System Requirements.

    At this time you can verify your system requirements by running the mt-check.cgi script in your browser. (If this script runs, the installation has gone well so far.) Consult Verifying System Requirements for more on this step.

  • Create Additional System Directories as Needed.

    You should also take the time to create directories on the server for your first weblog's content and the database if you are using a file-based option such as SQLite or Berkeley DB.

    Never place your weblog content in the scripts directory. This is bad practice and a security hazard.

With the software residing on your server and configured, you are now ready for Initializing the System.

Problem

You need to configure a Movable Type system.

Solution

Add to and modify the configuration directives in mt-config.cgi, the Movable Type configuration file.

Discussion

Configuration directives define the baseline information Movable Type needs to run in any given environment. These should not be confused with the system and weblog settings accessed through the MT interface. The configuration contains only the basic information that MT needs to get running.

The following steps detail the basic configuration each installation will initially need in order to get running.

  • Open mt-config.cgi

    Movable Type's configuration is stored as a text file named mt-config.cgi found in the MT application's directory. If this is your first time configuring the system you can rename mt-config.cgi-original, a sample and annotated configuration, or create one from scratch. Open this file with a text editor such as BBEdit, Notepad or vi.

  • Configure the CGI Path

    Set the CGIPath directive with the URL of MT without the script name. For example if your site is http://www.example.com/ and you are installing MT in its own subdirectory mt, under the CGI directory, you would use:

     CGIPath http://www.example.com/cgi/mt/

    With this directive you will be able to access MT with the URL http://www.example.com/cgi/mt/mt.cgi.

  • Configure Database Options

    Movable Type needs some information about your database setup in order to access your content and settings. How you handle this step may vary slightly due to the nature of each option.

    • MySQL
       ObjectDriver DBI::mysql
       Database mt_database_name
       DBUser database_user
       DBPassword secret_password
       DBHost database_server_name_or_IP
       

      The database that you specify must already exist. Movable Type cannot create it automatically. MT will initialize the database by creating all necessary tables and indices later. See Initializing the System.

    • PostgreSQL

      Configuring your system for PostgreSQL is identical to MySQL except for a PostgreSQL-only ObjectDriver value.

       ObjectDriver DBI::postgres
       

      Like MySQL, the database that you specify must already exist.

    • SQLite
       ObjectDriver DBI::sqlite
       Database /full/path/to/database/file.db

      SQLite is a file-based database system that runs on the same machine as the MT software. Directives such as DBUser and DBHost are not needed. Placed in a directory with Write permission, MT should be able to create the file during initialization.

    • Berkeley DB

      DataSource /full/path/to/database/directory

      Berkeley DB is Movable Type's default database option because of its near universal availability and easy configuration. It is still recommended that you consider using one of the other database options if at all possible. Berkeley DB is significantly slower and older versions are prone to data corruption issues.

  • Configure the URL path for the static system files

    Static files are resources such as style sheets, images and JavaScript libraries that are loaded by the browser in the process of presenting the MT system interface. By default MT assumes the static files are in mt-static, the same directory as your application in the distribution file.

    That said, many system administrators will shut down the ability of static files to be served from CGI directories such as the one where the MT code would reside. This is a security precaution to avoid the potential of code being dumped to a browser screen, possibly revealing information such as passwords that users generally shouldn't be privy to. (See knowledge base article "Images, Styles, and Documentation Do Not Show Up" for further explanation of this problem.)

    Therefore, while theoretically optional, it's highly recommended that the StaticWebPath be set to a location outside of any scripts directory.

    For example:

     StaticWebPath http://www.example.com/mt-static/
  • Save and exit mt-config.cgi

    Upon saving the configuration file, MT will be able to make use of the new settings. It is a good idea to keep a backup copy of your configuration in case it gets overwritten or inadvertently changed.

    If you are using SQLite or Berkeley DB, the initial system configuration is now complete.

Later phase: Add database selection

Also add some common and helpful directives. ReplyTo. Email address.

Problem

You want to run Movable Type on a Windows system.

Solution

Movable Type has been developed to run on a wide variety of operating systems including Windows, although this entails some additional considerations.

Discussion

One of Movable Type's strengths as a platform is that it runs in a wide variety of environments, letting you choose the operating system, web server, and database. As a Perl-based application though, Movable Type has historically been most at home on Unix-based operating systems like Linux, BSDs, or Mac OS X.

If you have chosen Windows as your platform, Windows Server 2003 is recommended for deployment in staging, development, or production. Windows XP Professional can also be substitued for staging or development scenarios.

In general, installing Movable Type on Windows is more a process of installing prerequisites than of configuring the application differently. A more comprehensive document explaining how to configure IIS, set up ActiveState's ActivePerl and MySQL for use with Movable Type can be found at http://www.sixapart.com/movabletype/docs/windows.

If you are installing MT on a Windows server which has already been properly configured for Perl, for running CGI scripts, and has one of the supported databases installed, you may not need to do anything differently at all.

The most common exceptions are as follows:

  • You may need to use a .pl for the script extensions.

    We highly recommend that, rather than using .pl extensions, you configure Windows to use .cgi for Perl scripts instead. (See Configuring A Windows Server To Run CGI Scripts.) Some plugins have configuration URLs which use .cgi extensions, and these links will not work if the server is not configured to recognize the file extension as a valid Perl script.

    If you still wish to use .pl for the default Movable Type files, follow these steps:

    • First, rename all of the mt*.cgi files to use .pl except for mt-config.cgi as this file is not actually an executable script. Movable Type cannot find it unless it is named with a .cgi extension.
    • Update your mt-config.cgi to recognize the new script names by adding these directives.
       AdminScript mt.pl
       CommentScript mt-comments.pl
       TrackbackScript mt-tb.pl
       SearchScript mt-search.pl
       XMLRPCScript mt-xmlrpc.pl
       ViewScript mt-view.pl
    • After doing this, save the file and upload it back to your server in ASCII mode, if you are working via FTP.
  • You may need to use a full server path for the database with the drive letter.

    The file-based database options (BerkeleyDB and SQLite) require you to specify a location on the file system. You may need to specify a full server path with the drive letter. For example in Berkeley DB:

     DataSource d:\html\users\domain\cgi-bin\mt\db
     

    With SQLite the database name is the database file, therefore:

     Database: d:\html\users\domain\cgi-bin\mt\mt.db
  • Assigning permissions works differently

    The user iusr_server (where server is the unique name of your machine) will not be assigned any permissions by default. You'll need to add that user to the folder where you want Movable Type to execute and publish your weblog files.

    Give the user either full control, or at a minimum the following permissions:

    • modify
    • read & execute
    • list folder contents
    • read
    • write

    Once you've added those permissions to the dialog box, but before you click OK, go to Advanced on the Security tab and check the box under permissions that says "Replace permission entries on all child objects with entries shown here that apply to child objects."

    Then click OK to close that dialog, click OK again to apply the permissions, and wait while Windows applies those settings.

    Shelley and Anil, Is this right? This is adapted from the KB and modified to cover the scripts being executable.

Problem

You want to verify that the Movable Type system requirements have been met.

Solution

Use your browser to run the mt-check.cgi script.

Discussion

Movable Type requires the presence of several standard Perl modules, separate from the Movable Type code itself. Movable Type comes with all of the required modules except for DB_File, DBD::mysql, DBD::Pg, DBD::sqlite, and DBI. These modules can not be distributed with Movable Type because they require some of their code to be compiled for your server's specific operating system and processor.

Movable Type's capabilities can be further enhanced with the presence of several other Perl modules that support optional features. Movable Type comes with some of these optional modules, except for HTML::Entities, Image::Magick, Storable, Crypt::DSA, and Mime::Base64. If you decide that you want to use these features you will need to install these modules; otherwise they can be ignored. If an optional module is not installed, mt-check.cgi will produce a warning message that will explain the Movable Type feature(s) that its absence impacts.

To determine whether these modules are installed, run the mt-check.cgi script from your browser. For example, if your site is http://www.example.com/, and you uploaded the Movable Type files into the /cgi-bin/mt directory, you'd type http://www.example.com/cgi-bin/mt/mt-check.cgi.

mt-check.cgi is a Perl script that checks whether required and optional modules are installed on your server. If you get a server error when running this script, your Movable Type software was not properly installed. Review the steps you took to install the software. Common mistakes include not setting proper permissions and failing to upload the files using ASCII mode. If these suggestions don't help, refer to the Movable Type Knowledge Base for more troubleshooting information at http://www.sixapart.com/movabletype/kb/.

If the script runs successfully and all required modules are present it will say "Movable Type System Check Successful." You are ready to continue. If you are missing any required modules or an optional module necessary to support additional functionality, install them and re-run mt-check.cgi.

Problem

You have installed or upgraded the Movable Type software and want to initialize the database.

Solution

Sign into the main Movable Type admin script (mt.cgi) for your domain (e.g. http://www.example.com/cgi-bin/mt/mt.cgi). You will be prompted to run the installation or upgrade process. Administrative rights are required to perform this task.

Discussion

To initialize your system after successfully installing the Movable Type software, simply sign in as the default user, Melody (password: Nelson). Movable Type will automatically detect that the system has not been initialized and begin the process of creating the necessary data tables and an initial weblog. If you have chosen MySQL or PostgreSQL as your database option, you should have had to create the database before signing in.

After the initialization is finished, you should change the username and password of the Melody account to something of your liking. To do so, click on Melody's name in the upper right corner of the admin interface to reach the profile page for the account.

This account is now the System Administrator account and has implicit access (through the system overview section of the application) to all parts of the system.

Note to previous users: Prior to Movable Type 3.2 users had to run a script named mt-load.cgi right after installing the system in order to create the necessary data tables and populate them with a sample weblog and an initial user. This step is no longer necessary.

Problem

You want support for an additional language.

Solution

Install one of Movable Type's language packs.

Discussion

Need input on how a user can request & acquire additional language packs.

Movable Type supports multiple languages through the use of language packs. A language pack is simply a list of translated phrases and words for use by the Movable Type system.

To install a language pack that you've downloaded from the Movable Type web site, follow these steps:

  • 1. Copy the translated phrases.

    The .pm file contains the plain-text list of translated phrases. Place this file into your extlib/MT/L10N/ directory in ASCII mode. If this directory structure does not exist, create it.

  • 2. Copy the images.

    The folder named lang-language_tag, where language_tag is the tag for the language you downloaded, contains the images needed by the system. Upload this folder, in BINARY mode, into the images folder that you uploaded when you installed Movable Type.

Problem

You want to upgrade the Movable Type software.

Solution

Upgrading follows nearly the same steps as installation except that you will want to perform a backup of your system before attempting the upgrade. If you are upgrading from Movable Type 3.1x or before, you will also want to migrate to the new configuration file: mt-config.cgi.

Discussion

If you're on any past version of Movable Type, version 3.2 offers a lot of features and improvements that will make managing your blogs easier. To take advantage of them, you'll need to install the latest version of the application. This document tells you how to upgrade your Movable Type installation from any past version.

Overview

The Movable Type upgrade process is straightforward if you've installed Movable Type in the past. We'll discuss each necessary step in detail below; here's a quick overview:

  • Review a list of technical prerequisites, including basics like an FTP program, a text editor, and a web browser
  • Collect information about your web server, including available storage space and configuration information such as FTP login user name and password
  • Prepare to upgrade by backing up your Movable Type data
  • Check the mt.cfg file settings to make sure they're still correct, and move them to the new mt-config.cgi file, if desired
  • Upload the new version of Movable Type on top of the old installation
  • Log in to your new version of Movable Type to complete the upgrade

If you're familiar with upgrading Movable Type, you can skip to the section on backing up your installation.

What you'll need

Installing Movable Type requires a little bit of software. You'll need:

  • A copy of the Movable Type software, which you should download from your Movable Type account. The .zip download is the best choice for Windows users and the .tar.gz is great for Unix command-line installations. You can always log in to your account to get another copy when you need it.

    As of version 3.2, Movable Type downloads are no longer split into Full and Upgrade versions - there is now a single download package which works whether you're installing Movable Type for the first time, or upgrading an existing installation.

  • An FTP (file transfer protocol) program to send the files from your computer to your server. If you need an FTP program, there are many available for free. (SmartFTP is a good FTP program for Windows, and offers a free trial version. Transmit is a good FTP program for Mac users on OS X, and it has a free trial, too.)

  • You may need a simple text editor to edit your configuration settings, and a web browser so you can log into Movable Type. These are free, too, and come with your computer. Windows users can use Wordpad (or even Notepad under normal circumstances) and Mac users can use TextEdit. All of these are bundled with the respective operating systems.

Good to have

Some additional items which can make your Movable Type upgrade experience a lot easier include:

  • Information about your web server or hosting account. (The email or confirmation message you got from your web hosting provider when you signed up for your account usually includes a lot of this information.)

  • The login information for your web server control panel. You may not need to change any settings in your hosting account's control panel, but you can often use it to help troubleshoot settings or to find useful information.

  • A web browser open to this documentation. If you get stuck, you'll want to be able to search for more information, either by searching the Movable Type User Manual and Knowledge Base, by requesting help from our support team at Six Apart, by navigating the community forum for Movable Type, or by searching the web.

Preparing to Upgrade

Before you upgrade, you'll need to do a few things:

  • Collect necessary information
  • Backing up your Movable Type data
  • Backing up your Movable Type application files
  • Remove outdated plugins

Collect your web server information

For the rest of the process, you'll need the FTP login information for your server (if you didn't use it already to back up your files) so that you can change or add files on your web server. If you already know your FTP information, you're all set. If you don't know it, refer to the help documentation, or introductory email message from your hosting provider to find out your FTP user name and password.

Just as important, you need to know where your current installation of Movable Type is located. This is very frequently in a directory called MT, which can be under your server's home directory for web pages, or in a special directory for applications called cgi-bin. If your root directory when you log in to FTP is /usr/example/htdocs, Movable Type is most likely in /usr/example/htdocs/mt or in /usr/example/htdocs/cgi-bin/mt.

One last tricky bit: the static folder. Some servers don't let you put application files and regular files (like images and javascript) into the same directory. In that case, you might have the directory mentioned above and another directory called something like mt-static. This directory with the images is called your "static directory", which just means it stores files that are served to your web site's visitors, instead of scripts that are run by your web server. If you have a static directory, just make a note of the location of both your application files and the static directory so you can refer to them in the future. One example of what this can look like:

  • Application directory: /usr/example/cgi-bin/mt
  • Static directory: /usr/example/htdocs/mt-static

Advanced Stuff: You'll need to make sure the FTP user you log in as has the right to change permissions on files (which is called CHMOD) that have been uploaded. If you aren't sure about this, and you've successfully installed Movable Type in the past, you're probably fine. You will also need to know where Perl is installed. (see Finding Perl on Your Server) The Perl application is usually at /usr/bin/perl but other locations can require some custom setup. Again, if you aren't sure about this, and you've successfully installed Movable Type in the past, you're probably fine and don't need to be concerned with this setting.

For optimal performance, you'll want to make sure you've got at least 10 megabytes of storage space available on your hosting account. You may want to know how much storage space you have left on your hosting account. Movable Type only takes up about two megabytes of space when installed, but your entries and web pages can take up a lot of space. This doesn't include your entries and web pages.and things can get erratic if you're very close to running out of space. Take a peek at your control panel and make sure you've got at least 10 megabytes of storage space available.

Backing up your Movable Type data

To get started, you'll need to back up your current data. Many times, people treat this kind of recommendation with the same nonchalance as advice to floss one's teeth or to rotate one's tires, but it's extremely important and you'll be glad you did. You can also keep this backup file to refer to in the future.

We've provided detailed instructions on how to fully backup your Movable Type data depending on which type of database server you're using:

These instructions will preserve all of your templates and detailed configuration settings, but if you just want to do a quick backup of your entries so that they're safe if something goes wrong with the upgrade, you can do so using the Export function that's built into Movable Type.

Not sure what type of database you're using? Most people use either Berkeley DB (sometimes called Sleepycat or BDB) or MySQL. If you don't remember setting up any kind of database when you installed Movable Type, you're probably on Berkeley, otherwise you're on MySQL. If you use a different database, you already know which one you use and why. If Movable Type is already running okay for you now, you won't need to change anything here, so don't fret if you aren't sure about this. Just follow the directions below to make sure you've got a backup.

Backing up your Movable Type application files

Before upgrading Movable Type, it's always a good idea is to store an intact copy of your entire Movable Type installation before you've made any changes. If anything were to go wrong, you would want to restore everything to its pre-upgrade state. Without the MT application files, this would be impossible. So while this step us optional, it only takes a few moments and the peace of mind from knowing that you have a complete back-up is always good.

To make a backup of your Movable Type application files, start your FTP program and download your entire Movable Type directory to a safe place on your computer.

If you have command-line access, you can simply compress a copy of your entire Movable Type directory using:

tar cvfz /path/to/mt-backup.tar.gz /path/to/mt/directory

If your static files are elsewhere, you can do the following:

tar cvfz /path/to/mt-backup.tar.gz /path/to/mt/directory /path/to/mt/static/files

Remove Outdated Plugins

Older versions of certain plugins or patches can cause a conflict with Version 3.2:

Nofollow plugin: If you were using the first release of this plugin, you should remove the old version first to avoid having two copies installed that may conflict with one another. This plugin began shipping with versions 3.16 and higher, and is located in the plugins/nofollow/ folder. After you're finished upgrading, view the README.txt file in that folder for more information on activating and using the plugin.

Mail Fix plugin: If you were using a version of Movable Type prior to 3.15, and you had installed the plugin version of the fix for this vulnerability, then you need to remove the patch-20050124-mail.spam.pl file from your plugins folder; otherwise, the code in this file will override certain bug fixes in higher versions.

MT Blacklist plugin: MT-Blacklist is not compatible with Movable Type 3.2 without some modifications. More importantly, thanks to the bundled spam protection in v3.2, it is no longer necessary to protect your installation from spammers. You should make sure to remove all plugin files related to MT-Blacklist in order to avoid conflicts with your installation.

SubCategories plugin: Version 3.1 integrated the SubCategories plugin, so if you have it installed, you must remove all related files before beginning the Movable Type upgrade. You may also need to migrate your subcategories data if you were actively using the plugin.

SpamLookup plugin: The SpamLookup plugin now ships with Movable Type. If you are a previous user of SpamLookup, you should be aware that your settings will not be preserved. If you are using the wordlists feature in particular, you should copy those to a safe place before upgrading. After upgrading, you should make sure that your Junk threshold is initially set to 0 on your Feedback settings page. You can change it later, but you should start with the default value because it's most likely the correct one.

Starting the Upgrade

The first thing you'll want to do once you're ready to upgrade is to uncompress the Movable Type application on your computer. If you have the .zip format, both OS X and Windows XP let you automatically uncompress the .zip file just by right-clicking on the file and choosing to extract the files. This will give you a new directory with all of the Movable Type application files in it.

Next, you'll want to log in to your web server via FTP, and navigate to the directory that has your Movable Type application files. This will often be a /cgi-bin/mt/ or a /mt directory under the location where your published web pages are located.

Once you've logged in, download mt.cfg and mt-db-pass.cgi from your MT directory to your computer so you can refer to them. mt.cfg is the configuration file which lists settings for your installation of Movable Type and mt-db-pass.cgi contains your database password if you're using MySQL or PostegreSQL.

In Movable Type 3.2, both of these files are replaced with a new file called mt-config.cgi. (Note: mt.cfg and mt-db-pass.cgi will work without any changes under 3.2, but it's strongly recommended to switch to mt-config.cgi for future compatibility) This file is distributed as mt-config.cgi-original to ensure that your configuration information isn't overwritten in a future upgrade, so you should first rename it to mt-config.cgi.

Then, copy your settings from mt.cfg and mt-db-pass.cgi into mt-config.cgi. This process should be straightforward, except for perhaps the database password which should be entered on the line for DBPassword in mt-config.cgi. Again, if you are using any database other than MySQL or PostgreSQL, you won't have a database password to transfer from mt-db-pass.cgi. For further information, please see the Knowledge Base article entitled "Convert To Using The New Configuration File".

Upload the application files

Now you're ready to actually upload Movable Type to your server.

AltTemplatePath and use of alternate application templates: If you have made use of Movable Type's facility for alternate application templates through the use of the `AltTemplatePath` configuration directive, you should move these files aside since they were created for previous versions of Movable Type and are not compatible with MT 3.2.

Open the directory that has the Movable Type 3.2 files you uncompressed, and select all of the files and directories it contains. Use your FTP program to navigate to the location on your server where Movable Type is installed (usually /mt or /cgi-bin/mt and then transfer all the Movable Type files from your computer to the server, right on top of the existing application files.

extlib and search_templates folders: If you have added any special modules into your existing extlib folder, use caution when uploading the new files, to make sure you don't inadvertently overwrite any files already there which you need to keep. If you've customized your search templates by editing the files in search_templates, do **not** select this folder from the distribution for upload, or you will **lose** your changes to these files.

If you are using a static directory for your Movable Type image and javascript files above (mentioned above in the section "Collect your web server information"), there's one extra step here. You should upload the entire mt-static directory from the Movable Type 3.2 archive into your static folder. If you've forgotten where that directory is, you can look in mt-config.cgi for a line containing StaticWebPath.

Important note: All files except those in `mt-static/images` should be uploaded explicitly in ASCII mode (also sometimes called "Text mode"). The mt-static/images directory should be uploaded in Binary (or raw data) mode. The leading cause of installation and upgrade woes is the use of the wrong mode or use of Automatic mode with certain FTP software.

During the transfer, your newly-uploaded Movable Type 3.2 files should overwrite the files for your older version of Movable Type. Most FTP programs will confirm that this was really what you wanted to do, and you can confirm that this is the case. This should also automatically result in your new application folders inheriting the permissions that were applied to your old installation.

If you'd like to check that the permissions are correct, just make sure that all the files with a .cgi extension in your Movable Type folder on the server have Execute permissions; Most servers list this as 755 permissions, but it might also be listed as -rwxr-xr-x. Again, there's probably no need to change this, but you can check just to be sure.

Finishing the upgrade

After all of your application files are in place, you simply open up your MT admin interface (the URL ending in /mt.cgi) in your web browser. The system may prompt you for permission to execute some database upgrade steps, after which you will be fully upgraded.

Congratulations! You're now running Movable Type 3.2!

A note about template upgrade

Once you have completed upgrading the system software, you may wish to also upgrade your templates in order to take advantage of the latest capabilities of the system. While Movable Type attempts to maintain backwards compatibility with previous versions, some behavioral changes may result in incorrect display of your published content.

If you'd like to restore any of your templates to the default settings in Movable Type 3.2, you can use the template refresh functionality provided by the "Template Backup and Refresh" plugin.

  • You can select individual templates to refresh from the weblog's template listing screen. Select the option "Refresh template(s) from the dropdown in the action bar and the selected templates will be updated to the latest.

  • If you want to refresh all templates in a blog, you can do so via the System Overview weblog listing. Just select the weblog from that listing and the dropdown option "Refresh template(s)" and all existing templates in your blog will be refreshed to the latest.

Problem

You want to upgrade your templates to the latest code.

Solution

With one notable exception, the Template Backup and Refresh plugin, shipped with Movable Type 3.2, is the easiest way to upgrade your templates to the latest default code.

Discussion

Once you have completed the upgrade of the system software, you may wish to also upgrade your templates in order to take advantage of the latest capabilities of the system. While the developers of Movable Type attempt to maintain backwards compatibility with previous versions, some behavioral changes may result in incorrect display of your published content.

Restoring all templates in a weblog

If you want to refresh all current templates in a blog, you can do so via the System Overview weblog listing. Just select the weblog from that listing which you wish to refresh and the dropdown option "Refresh template(s)" and all existing templates in your blog will be backed up and refreshed to the latest default templates.

In addition to refreshing all of your current templates, this method will also add in any missing default templates such as the Site Javascript template for those who are upgrading from version prior to v3.2

Restoring templates individually

If you'd like to restore a particular template or limited subset of templates to the latest default code, navigate to the weblog's template listing and select the template(s) you wish to refresh. After that, select the "Refresh Template(s)" option from the dropdown in the action bar menu. The selected templates will be updated to the latest code for your version.

Problem

You want to import a collection of entries from another system.

Solution

Click the Import/Export button on the Weblog Toolbar and fill out the form on the Import Entries tab.

Discussion

Movable Type allows you to import entries from another MT system or another weblogging system or service such as Blogger or WordPress.

This can be useful when you wish to start using Movable Type but already have much of your content in another system. To do this, you will need to export your content from the other system. Consult the Import Format specification and the Movable Type Knowledge Base for more specific instructions regarding the creation of export templates in tools such as Blogger and WordPress.

Importing data into Movable Type

To import entries and comments into a weblog:

  • 1. Transfer your export file to a directory called import in the MT application directory. If this is your first time performing an import in the system, you may have to create the directory.
  • 2. Sign into Movable Type and select the weblog into which you wish to import the entries. Click the Import/Export button on the Weblog Toolbar.
  • 3. Set the import form options found on the Import Entries tab. For more information on particular options, see the following articles:
  • 4. Click the Import Entries button

    After specifying the import options, press Import Entries. That's it!

    You will need to rebuild all of your files in order to generate your archives for the new imported entries.

You should now remove all of the files that you imported from the import directory, so that if or when you run the import process again at some later date, the entries you just imported will not be re-imported.

If you imported them from a system without categories, after importing your entries you may need to assign categories to each. A fast way to do this is to use Movable Type's Power-Editing Mode which allows you to edit multiple entries at once. This feature is covered in Making bulk modifications.

Import/export limitations

Unfortunately, at this time, the Movable Type import/export format is considered a "lossy" format, meaning that if you perform and export, delete all of your entries/comments/TrackBacks and reimport, certain data will be lost.

The data not handled by the import/export format relates to features introduced in and since Movable Type 3.0. These are:

  • Entry basename
  • Comment/TrackBack moderation status
  • Authenticated commenter data (e.g. TypeKey username) and status.

We apologize for the inconvenience and will be addressing these shortcomings in a future version of Movable Type. In the meantime, the best way to achieve a lossless transfer is to use your database's export functionality. See the "backup/restore" topics in the Installation and Upgrade chapter of this documentation for details.

Problem

You want to make a backup of a weblog's entries, comments and TrackBacks.

Solution

Click the Export Entries tab of the Import/Export screen which can be reached via the Import/Export button on the Weblog Toolbar.

Discussion

Exporting your entries from Movable Type allows you to keep personal backups of your blog entries for safekeeping. This exported content is suitable for importing back into the system via the import mechanism. (See Importing Weblog Content.) In addition to exporting your entries for backup purposes, you can also use this to move your content between systems.

To export the entries and comments of a weblog, click the Import/Export button on the Weblog Toolbar. On the Export Entries tab is the link "Export Entries From Weblog." Clicking this link will generate an export file of your content. Depending on the size of your weblog this may take some time to download.

Import/export limitations

Unfortunately, at this time, the Movable Type import/export format is considered a "lossy" format, meaning that if you perform and export, delete all of your entries/comments/TrackBacks and reimport, certain data will be lost.

The data not handled by the import/export format relates to features introduced in and since Movable Type 3.0. These are:

  • Entry basename
  • Comment/TrackBack moderation status
  • Authenticated commenter data (e.g. TypeKey username) and status.

We apologize for the inconvenience and will be addressing these shortcomings in a future version of Movable Type. In the meantime, the best way to achieve a lossless transfer is to use your database's export functionality. See the "backup/restore" topics in the Installation and Upgrade chapter of this documentation for details.

Backing up your database is an essential part of a healthy Movable Type maintainance schedule and critically important any time you endeavor to upgrade your system.

You can back up and restore a MySQL database in one of two ways:

  • Via phpMyAdmin
  • Via the command line

Backing up via phpMyAdmin

phpMyAdmin is the most popular web-based interface to MySQL and is usually preinstalled in most shared hosting accounts. Through it, you can perform any action on the database including backups and restoration.

To back up your database, open your phpMyAdmin page in your web browser and select your database from the dropdown on the left. From the the main database page, click on "Export" in the top button bar.

Set up the options as follows:

Export section

This section determines from which tables data should be exported and the format of the file itself. You should "Select All" tables and choose SQL as the data type.

SQL section

This section gives you various SQL syntax options that you can choose for your export. You should check both the Structure and Data checkboxes.

  • Structure - Check the following SQL structure options:
    • Add DROP TABLE
    • Add AUTO_INCREMENT value
    • Enclose table and fieldnames with backquotes
  • Data - Do not check any of SQL insert syntax options (e.g. Complete, Extended, Delayed) but make sure that the "Export type" is set to "INSERT".

"Save as file" section

This section lets you choose options about the exported file itself. If you want to save your export to a file (always helpful when you want to actually back up your data), check the "Save as file" button.

In Filename template, you can set the name of the file to be saved to your desktop. The default is DB which yields the database name plus .sql file extension. This is fine for a one time backup, but I tend to prefer %Y%m%d%H%M%S-DB which yields a time-stamped filename (e.g. 20040510120000-mt.sql).

By default, the export will be downloaded in a plain text file format. If, however, your database is very large, you may want to choose some form of compression to shorten your download and save on bandwidth. Note that due to a bug in the software at the time of writing, if you choose a compression format, the .gz and .zip extensions may no be added on and so you may want to add them yourself after the download is complete.

Go!

Once you hit the "Go" button, the download of your export file will proceed and phpMyAdmin will remember your settings for the next time.

Restoring via phpMyAdmin

To restore from a backup, click on the SQL tab in the top menu bar. You will see a button labelled "Choose file". Click it and select the MySQL export file from your computer in the resulting dialog box. Leave the "Compression" option at "Autodetect" unless you experience problems. Click on Go and your database will be restored!

Backing up via the command line

To backup from the command line of your shell account, log in and type the following at the prompt replacing USERNAME and DATABASE as described previously:

mysqldump -a -u USERNAME -p DATABASE > FILENAME.mysql

You will be prompted for your database password and then the DATABASE will be dumped to a plain-text file called FILENAME.mysql.

The resulting file, FILENAME.mysql, is a full backup with which you can fully restore your database in case of problems.

Restoring via the command line

Restoring from FILENAME.mysql is a three step process:

  1. Drop the database

    mysqladmin -u USERNAME -p drop DATABASE

  2. Recreate the database

    mysqladmin -u USERNAME -p create DATABASE

  3. Import the backup data

    mysql -u USERNAME -p DATABASE < FILENAME.mysql

Backing up your database is an essential part of a healthy Movable Type maintainance schedule and critically important any time you endeavor to upgrade your system.

Downloading your database

Since the SQLite database is a simple file, backing it up is as easy as downloading it and saving it to a safe place. The file path and name is listed in mt-config.cgi just in case you forgot. Just make sure to download it in your FTP software's binary mode.

Command-line backups

If you have shell access, you can simply make a dated, compressed copy of your database with the following command:

tar cvfz `date +%Y%m%d`_mtdb_bkup.sql.tar.gz DATABASE

Just replace DATABASE with the path and filename of your SQLite database. Because the backup archive is dated, this is an excellent way to set up a cron job on your system to achieve regular backups.

Command-line restore

To restore the files from the archive, you execute the following:

tar xvfz ARCHIVE.tar.gz

...where ARCHIVE is the archive file that contains your database. This will recreate the directory and files of your original database.

Backing up your database is an essential part of a healthy Movable Type maintainance schedule and critically important any time you endeavor to upgrade your system.

Backup/restore via FTP

BerkeleyDB stores your database in a number of files within a particular directory that you've specified in the mt-config.cgi. You can backup your database by downloading the entire database directory in binary mode.

To restore the database, simply remove the current directory from the server and reupload the backup in binary mode.

Command-line backups

If you have shell access, you can make a dated, compressed copy of your database with the following command:

tar cvfz `date +%Y%m%d`_mtdb_bkup.tar.gz DBDIRECTORY

Just replace DBDIRECTORY with the path of your database directory. If you're in the directory containing your database directory, you can just use the directory name with no extra path information. For example, if your database directory is db:

tar cvfz `date +%Y%m%d`_mtdb_bkup.tar.gz ./db

Because the backup archive is dated, this is an excellent way to set up a cron job on your system to achieve regular backups.

Command-line restore

To restore the files from the archive, you execute the following:

tar xvfz ARCHIVE.tar.gz

...where ARCHIVE is the archive file that contains your database.

Six Apart
Makers of weblog software and services for individuals, organizations and businesses.
This website is powered by Movable Type.