mtupgrade - Upgrading Movable Type
This document describes the process of upgrading to a newer version of Movable Type.
If you have already installed a previous version of Movable Type (1.0-3.01D) you do not need to perform a complete installation; instead, follow these instructions to upgrade your installation.
If you have not yet installed Movable Type, see the installation instructions.
With any upgrade, it is a good idea to B>backup your data? before doing the upgrade. To backup your data in the most usable way, use Movable Type's ``Export'' feature within each of your weblogs. In the case that something goes wrong while upgrading, you will then have your entries and comments in importable form.
Download the upgrade distribution file (rather than the full distribution). Unpack the .tar.gz archive that you downloaded.
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 modified your search templates in the search_templates directory, do NOT upload the search_templates directory from the upgrade distribution; doing so will overwrite your search templates.
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, styles.css, and mt.js to the correct location.
NOTE: Movable Type 3.0 and later contain new files that support a better user interface. If you're using a ``static files'' directory, as described in ``Configure path to Static files'', you'll need to move mt.js and styles.css to that directory.
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).
To upgrade from one version to another, you need to run a series of upgrade scripts, which will upgrade the application to each intermediate version. The details are given below:
For security reasons, you should remove the following files from your FTP server after your upgrade is complete:
Movable Type 3.1 has some new features that require additional setup. If you're interested in serving some of your blog pages dynamically, or using the scheduled posting feature, you'll need to take some additional steps to set up those features. See the Guide to 3.1 for information on how to configure Dynamic Pages, Post Scheduling, and Subcategories.
Movable Type is now upgraded, and you can start using the new version.
Take a look at the Guide to 3.1 for a guide to finding and using the newest features.
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 weblogs, and check the Convert line and
paragraph breaks in comments
box.
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.
As of version 2.2, Movable Type started supporting SQL databases (MySQL). In version 2.6, support for PostgreSQL and SQLite were added. Note that this is only an option--the Berkeley DB data storage is still supported. If you are not interested in using a SQL database, or if your server does not have the ability to use a SQL database, skip this section.
If you have already converted your version of Movable Type to use the SQL database support, skip this section.
To determine whether your server supports a SQL database, and the Perl libraries required to connect to it, run mt-check.cgi and look at the status for any of the following modules: DBD::mysql, DBD::Pg, or DBD::SQLite. If any of these are installed, your server will support that version of Movable Type. If none of these are installed, you will need to contact your host if you wish to use a SQL database.
If you are interested in converting your data, a conversion script to copy your data from the Berkeley DB files into the SQL database is included in the upgrade distribution (mt-db2sql.cgi). To convert your existing MT installation to using a SQL database, follow these steps:
ObjectDriver driver_name Database database_name DBUser database_user
where driver_name is one of the following: DBI::mysql, DBI::postgres, or DBI::sqlite; database_name is the name of the SQL database where you wish to store your data; and database_user is the username used to connect to that database (note that if you are using SQLite, neither a username nor a password is required).
If your SQL database server is on a different host, you can use DBHost to specify the hostname:
DBHost database_host
Note: if you are using either PostgreSQL or MySQL, the database that you specify in database_name must already exist--Movable Type cannot create it automatically!
For security purposes, your SQL database 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 SQL database.
mt-db2sql.cgi is a Perl script that will create the necessary schema in your SQL database, then populate the database with the data from your Berkeley DB files.
Done copying data from Berkeley DB to SQL database! 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 SQL 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 driver_name
where, again, driver_name is the name of the driver you set in Step 1.
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.