Upgrading
From Habari Project
Contents
|
Before You Upgrade
Before making any major change in your Habari installation, it would be prudent to create a backup of your database and your installation, in particular all the files in your Habari /user directory. The /user directory should contain all files which you have customized - plugins you have installed, themes you have installed, class files you may have modified, or locale files you have installed.
The Upgrade Process
- Download the new version of Habari that you will be installing. Unzip it into the location of your choice.
- Deactivate your active plugins. Some of the system plugins may have been changed. Some of the plugins you got in other places may not be compatible with the new version of Habari.
- Delete the following directories from the old install:
- /3rdparty
- /scripts
- /doc
- /system
- Delete the index.php, LICENSE, and NOTICE files from the root of your installation. Do not delete your config.php file if it is in the root of your Habari installation, or the .htaccess file.
- Copy the new version of Habari to the same location as the old version.
- Using your web browser, navigate to your site. If there are any database changes that need to be made, they will be made automatically at this time.
- Log into your Habari administrative area. Navigate to the plugins page and reactivate the plugins one by one.
- Celebrate and enjoy the new features of your latest version of Habari!
Version Specific Instructions
Upgrading from Version 0.5.2 to Version 0.6
Version 0.6 incorporates many changes from the previous version, both in bug fixes and new features. For details see the release notes.
Habari's upgrade process is designed to be transparent, with the only indication that an upgrade is happening being a slightly longer page load time the first time the site is visited after the software is updated.
One major change that affects the upgrade process in this release is in how Habari stores it's configuration details. Habari 0.5.2 and earlier stored site configuration details in global variables. Habari 0.6 marks the move to using a config class, so the variables aren't globally available, a change that was made to improve security. These details are stored in the site's config.php file, which is located either in the root of the site's directory, or, for multisite users, in Habari's /user/sites/site_name directory.
For users who have left their config.php file writable, the necessary changes to the configuration file will be handled by the upgrade process transparently. For users who have made their configuration file read only, some manual changes will have to be made before the upgrade process can begin.
Manually Updating The Configuration File
The config.php file for Habari version 0.5.2 and below looks like this:
For MySQL
<?php
$db_connection= array(
'connection_string'=>'mysql:host={$db_host};dbname={$db_schema}',
'username'=>'{$db_user}',
'password'=>'{$db_pass}',
'prefix'=>'{$table_prefix}'
);
?>
For SQLite
<?php
$db_connection= array(
'connection_string'=>'sqlite:{$db_file}',
'username'=>'',
'password'=>'',
'prefix'=>'{$table_prefix}'
);
?>
With version 0.6 the config file looks like this:
For MySQL
<?php
Config::set( 'db_connection', array(
'connection_string'=>'mysql:host={$db_host};dbname={$db_schema}',
'username'=>'{$db_user}',
'password'=>'{$db_pass}',
'prefix'=>'{$table_prefix}'
));
?>
For SQLite
<?php
Config::set( 'db_connection', array(
'connection_string'=>'sqlite:{$db_file}',
'username'=>'',
'password'=>'',
'prefix'=>'{$table_prefix}'
));
?>
The easiest thing to do is, before upgrading, make the configuration file writable. Perform the upgrade, then make the file read only again.
If you don't wish to do that, open the configuration file in a text editor and make the changes shown above, save your changes, then navigate to your site so the upgrade process can proceed.
Upgrading from Version 0.5 or 0.5.1 to Version 0.5.2
Version 0.5.2 is a bugfix release only. No new functionality has been incorporated into Habari. The only files that have changed are located in the /system/classes directory, so if you wish you can just delete the files from that subdirectory, then copy the updated /system/classes files to it. To be completely safe, follow the upgrade process detailed above.
Upgrading from Version 0.5 to Version 0.5.1
Version 0.5.1 is a bugfix release only. No new functionality has been incorporated into Habari. The only files that have changed are located in the /system/classes directory, so if you wish you can just delete the files from that subdirectory, then copy the updated /system/classes files to it. To be completely safe, follow the upgrade process detailed above.
Upgrading from Version 0.4.1 To Version 0.5
Many changes have been incorporated into version 0.5. For details of the changes that have been made see the release notes.
In particular, upgrade functions have been incorporated into the install handler, so when you upgrade your Habari installation, any required base database changes will be automatically handled without user intervention. However, the following are issues to note:
- The first page load after upgrading may be slow due to the conversion of the database to use UTF-8.
- Version 0.5 incorporates updates to Habari's form creation system that changes how the options for plugins are stored. This means that you will need to reconfigure any of your plugins that require configuration for them to work properly.
- The location of the filecache has been moved from /system/cache to /user/cache. If your /user directory is not writable by the web server, you will need to create the /user/cache directory by hand and set it to be writable by the web server.
Upgrading From Version 0.3.3 to 0.4
Upgrading From Version 0.2 To Version 0.3
Before Upgrading
This upgrade process assumes you are somewhat familiar with accessing your database, via an admin interface like phpMyAdmin, if you are unfamiliar with this, you should contact your host and completely familiarize yourself with their database administration.
It is recommended that you rename your version of K2 if you are using that (change the name in the theme.xml file and the /user/themes directory).
Upgrading
It is safe to use the same database as 0.2, but if possible, the following actions should be taken:
- Remove the `themes` table.
- Clear the `rewrite_rules` table.
MySQL
The upgrading process with MySQL is transparent as of the 0.3 release.
SQLite
Please note: If you need a web manager for SQLite dabases, SQLite Manager looks like a sane solution.
- Move the database file to a different location.
- Install Habari.
- Overwrite the created database file with the one from step 1.
- Create the tables: `groups`, `groups_permissions`, `permissions` and `users_groups`. Refer to the SQL schema files for the CREATE statements.
The only difference left is the tables' structure. From 0.2 to 0.3 we modified column types, INT became SMALLINT and such. It should not affect your installation.
