Make your own free website on Tripod.com

Movable Type Upgrading Instructions


NAME

mtupgrade - Upgrading Movable Type


SYNOPSIS

This document describes the process of upgrading to a newer version of Movable Type.


UPGRADING

If you have already installed a previous version of Movable Type (1.0-2.21) you do not need to perform a complete installation. If you have not yet installed Movable Type, see the installation instructions.

Precautions

With any upgrade, it is a good idea to export the entries and comments from each of your blogs before doing the upgrade. In the case that something goes wrong while upgrading, you will then have your entries and comments in importable form.

Downloading

Download the upgrade distribution file (rather than the full distribution). Unpack the .tar.gz archive that you downloaded.

Uploading Files

  1. Connect to your webserver
    Open an FTP connection to your webserver, and open the directory where you installed Movable Type.

  2. Upload the application
    Upload all of the files and directories in the archive to your webserver, replacing any older copies of the files.

    Make sure that you upload all of the files in ASCII mode, except for the images, which should be uploaded in binary.

    When you are uploading the files in the extlib directory, be careful not to overwrite any libraries that you installed there when you first installed Movable Type.

    NOTE: if you have made changes to any of the files that you are replacing, you will need to mark the files that have changed, and make the same changes to the new versions. This only applies if the changes you made have not been incorporated into the new Movable Type release in some form, of course. If you are unsure whether you need to redo a change you have made to one of the Movable Type files, ask your question on the Support Forum (http://www.movabletype.org/support/).

    NOTE: if your MT application is stored in your cgi-bin, and thus if your images, documentation, and stylesheet are stored outside of the cgi-bin, be sure to upload images, docs, and styles.css to the correct location.

  3. Check permissions
    Ensure that the permissions of each of the CGI scripts (all files ending in the extension .cgi) are set to 755.

    This means that the owner should have read, write, and execute permissions, and that group and other should have read and execute permissions (but not write permissions).

Running Upgrade Scripts

Deleting Upgrade Scripts

For security reasons, you should remove the following files from your FTP server after your upgrade is complete:

You're Done!

Movable Type is now upgraded, and you can start using the new version.


NOTES

If you are upgrading from a version older than 1.3

As of version 1.3, you can now control line and paragraph breaks separately for comments and entries; in other words, you can set Convert breaks for comments, but not for entries, if you would like. NOTE that if you wish to convert line and paragraph breaks in comments in version 1.3, you need to edit the configuration for each of your blogs, and check the Convert line and paragraph breaks in comments box.

If you are upgrading from a version older than 1.4

As of version 1.4, Movable Type requires at least version 0.8 of the File::Spec Perl module. If you do not have at least version 0.8, you will get this error after upgrading:

Can't locate object method "splitpath" via package "File::Spec"
at lib/MT.pm line 209.

If you are not certain whether your server has a sufficiently new version of File::Spec, you should run mt-check.cgi again (see CHECKING FOR REQUIRED AND OPTIONAL MODULES, below); if your server needs a newer version of File::Spec, follow the instructions here.

If you are upgrading from a version older than 2.2

As of version 2.2, Movable Type supports using MySQL for data storage. Note that this is only an option--the Berkeley DB data storage is still supported. If you are not interested in using MySQL, or if you do not have the ability to use MySQL on your server, skip this section.

If you have already converted your version of Movable Type to use the MySQL support, skip this section.

To determine whether your server supports MySQL and the Perl libraries needed to connect to it, run mt-check.cgi and look at the status for the module DBD::mysql. If it is installed, your server will support the MySQL version of Movable Type. If it is not installed, you will need to contact your host if you wish to use MySQL.

If you are interested in converting, a conversion script to copy your data from the Berkeley DB files into MySQL is included in the upgrade distribution (mt-db2mysql.cgi). To convert your existing MT installation to using MySQL, follow these steps:

  1. Edit your mt.cfg file.
    Open your mt.cfg file in a text editor, and add these lines to it:
    ObjectDriver DBI::mysql
    Database database_name
    DBUser database_user
    

    where database_name is the name of the MySQL database where you wish to store your data, and database_user is the username used to connect to that database. If your MySQL server is on a different host, you can use DBHost to specify the hostname:

    DBHost database_host
    

    Note: the database that you specify must already exist--Movable Type cannot create it automatically!

  2. Set your MySQL password.
    For security purposes, your MySQL password should not simply be placed in mt.cfg. Instead, you must set it in the file called mt-db-pass.cgi.

    Open mt-db-pass.cgi in a text editor. On this line:

    database_password
    

    Replace database_password with the password used to connect to your MySQL database.

  3. Run mt-db2mysql.cgi
    Open your web browser and point it at the URL for mt-db2mysql.cgi on your site. For example, if your site is http://www.your-site.com/, and you uploaded the Movable Type files into the /mt directory, you'd type http://www.your-site.com/mt/mt-db2mysql.cgi.

    mt-db2mysql.cgi is a Perl script that will create the necessary schema in your MySQL database, then populate the database with the data from your Berkeley DB files.

  4. Check for success
    Once mt-db2mysql.cgi has finished executing, look at the bottom of the page in your browser to check whether the conversion was successful. If it was, this message will be displayed:
    Done copying data from Berkeley DB to MySQL! All went well.
    

    If you received this message, you're done. When you log in to Movable Type and use the system, you will now be using the MySQL version of the system.

    If an error occurred, the message

    An error occurred while loading data:
    

    will be displayed, along with the actual error message. If an error occurred, edit your mt.cfg file and remove the following line:

    ObjectDriver DBI::mysql
    

    Now you will be back to using the Berkeley DB version of Movable Type. Post the error message that you received on the Support Forums.


Copyright © 2001, 2002 Ben Trott and Mena Trott. All Rights Reserved.