!!! ALWAYS BACKUP CODE, DATA, AND CONFIGS BEFORE UPGRADING !!!
This includes your Mantis directory, your attachments, and your database.
Unless you are familiar with PHP, it is not recommended to use non-released versions of Mantis (i.e. CVS versions). These versions are not tested for general use and there might not be an easy upgrade path for the next release from such intermediate versions.
It is preferable to create a new directory for each release. This ensures that all files are intact and that there is a path to downgrade your installation, if you need to. Generally for minor versions upgrade (eg: 0.17.3 to 0.17.5) you can just copy over the old code. You may want to backup up your current config_inc.php and any customizations in custom_strings_inc.php, custom_constants_inc.php, and custom_functions_inc.php that you may have made.
NOTE: The default configuration file can be located under Mantis main folder with the name config_defaults_inc.php. You can override these configurations by adding config_inc.php which should include only the configuration variables that you want to change from the defaults.
Mantis will first pull the default values, then pull the site specific values. This way you will gain the new global variables but not have to continually reset your core settings. It is best to leave the default file alone. It is recommended to take a few minutes and create a minimal config_inc.php file that contains only values that are different from the config_defaults_inc.php file. Email values, database settings, path values, and any settings different from the defaults should go in here.
- Log out of the system before upgrading
- Indicate to users that the system is in an offline mode by
cp mantis_offline.php.sample mantis_offline.php
- First, transfer the file to your webserver using whatever method you like
best (ftp, scp, etc). You will need to telnet/ssh into the server machine for
the next steps.
- Next, untar/gunzip it to the directory that you want.
The usual command is (1 step):
tar zxvf <filename.tar.gz>
OR (2 steps):
tar xvf <filename.tar>
Note the name of the mantis source directory that is created. It should be of the form "mantis-release" (e.g., mantis-1.0.0rc1). Winzip, Stuffit, and other programs should also be able to handle decompression of the archive.
- Copy the configuration files (config_inc.php, custom_strings_inc.php, custom_constants_inc.php, and custom_functions_inc.php) to the new directory to preserve your settings.
- Next we will update the necessary database tables.
If you are upgrading from a pre-1.0.0 (including 1.0.0a* or 1.0.0rc*) installation to 1.0.0, access http://yoursite/mantis-release/admin/upgrade.php. This will upgrade your database to 1.0.0. Once your database has reached release 1.0.0, you can use the method listed below.
From your web server, access http://yoursite/mantis-release/admin/install.php
This page will walk through the following steps:
- check basic parameters for the web server
- Confirm the database type and location, and a database user/password
pair. For update, an administrative user/password pair can also be
provided. The operating user requires ALTER, SELECT, DELETE, INSERT, and UPDATE
privileges. For installation or upgrade, INDEX, CREATE, DELETE, and DROP privileges are
- update the database and tables.
- perform some post installation checks on the system.
- You can load up http://yoursite/mantis-release/admin/check.php to see if you set things up correctly.
- At this point you may want to rename the directory to something simpler like
'mantis'. You will use the mv command to rename a directory (Windows users
substitute the "ren" command or use explorer).
mv mantis mantis-old
mv mantis-release mantis