Upgrade 1.9.x to 2.x
This document is intended to those upgrading from a Tiki site running version 1.9.x to the latest 2.x branch, and also to those upgrading from earlier versions of branch 2.x (e.g, 2.0, 2.1) to the latest stable version (2.2, at the moment of writing this note).
Please note that everywhere where it says version 1.10 in the screenshots, you have to read it as if it said the current branch 2.0 (1.10 was renamed in July 2008 as 2.0)
.
First Backup whole filesystem and database
Upgrade:
Download the tar-ball as tar.bz2 or zipped file
or use the svn version
Copy to clipboard svn co https://tikiwiki.svn.sourceforge.net/svnroot/tikiwiki/branches/2.0
Have it transfered to your server. We assume that you have not changed any tikiwiki-files (php, tpl, ... -files); if you have, then make a backup of your modified files, to put them back to your installation after the basic upgrade is performed.
Upgrade in the same directory
- Untar it somewhere
(windows users might like to use the free software program 7-zip, translated to many languages, for decompressing any of those file formats)
- copy it over your existing tikiwiki source (replace files)
- New in Tiki >= 2.0rc1: Rename your current ./db/local.php file to something else (for instance, ./db/local_backup.php. Otherwise, the next step might show just a blank screen to you if the database cited in local.php comes from a 1.9.x installation, as it should if your are reading this specific upgrade page.
- Run tiki-install.php (or tiki-install.php?lang=XX to have the installation messages in a language other than English, if it has been translated already) to login as admin
After that, you will see the main install & upgrade screen
- If you were not using the latest stable version of Tiki 1.9.x, in Upgrade section, select tiki_1.8to1.9.sql (this will give you the latest DB structure)
- In Upgrade section, select tiki_1.9to2.0.sql (This will give you 2.0.y database structure if you are coming from a 1.9.x Tiki, or the latest 2.x structure, if coming from an earlier version of 2.x branch; e.g., from 2.0, or 2.1 to 2.2 or whatever version number is the latest stable version from 2.x branch)
- Click on "Do nothing and enter Tiki", at the bottom of the page
- log into the tikiwiki as admin and check the preferences
- empty all the cache in tiki-admin_system.php
- done!
Upgrade on another directory/ database
- Untar the tar or zip somewhere
- Duplicate the database in a new one
- Copy db/local.php and update it with the new database name/login/password.
- Copy your styles and the templates you have changed in your styles in the new directory
- Do the adequate update to the templates of your styles. This can be a difficult task. The best is to diff the templates in the 1.9 directory and to report the change in the 2.x directory
- Copy all your local files . Be careful when creating the directory to have them readeable/writeable by the server
- File gallery directory
- Image gallery directory
- see this page for the complete list of directories
- Run tiki-install.php to upgrade the database or run
Copy to clipboard sh doc/devtools/sqlupgrade.sh
- Clear the cache
Note:
If you were already using some 1.10/2.0 pre-release before December'07, and want to upgrade to the latest 2.0, please note that the permission system for categories has changed (See Categories Details for more details):
- Assign tiki_p_view_categories, tiki_p_view_categorized to Anonymous or whatever group you need it for.
- Assign tiki_p_edit_categorized to Registered or whatever group you need it for.
- Also, the categories are using cache extensively, then think to empty temp/cache/ dir from tiki-admin_system.php after upgrade.
Starting in TikiWiki 2.0, preferences format has changed both in the Smarty templates and the php code. This is to make TikiWiki faster and to make it easier for developers.
- All preferences variables that you put in your custom template (For example: templates/styles/mycustomtheme/mycustomtemplate.tpl) need to be renamed. For example, $feature_foobar becomes $prefs.feature_foobar.
- In your customized php code, all preferences must be changed to $prefs'..', for instance $prefs'feature_foobar'. Do not forgot also to change the global to global $prefs when needed.
If you have highly customized Tiki, you may not want to take the time to change them all. In this case, you can use the option below to maintain the previous behavior. Preferences Syntax
Addendum
If you change your mind and you want to make a brand new installation instead of upgrading your existing one, you can click on the "Reinstall database" link on the box on the left at tiki-install.php.
This will allow you to select the type of profile and remove your current tiki installation to create a brand new one from scratch at the same time.
Remenber to backup first, in case you need your old data later on.
Change in event & calendar permissioms
Between 1.9.x, and 2.x, a new permission, tiki_p_view_events was added. You should add this to the appropriate groups (presumably to those who have the tiki_p_view_calendar permission in 1.9.x)
|