Loading...
 
Skip to main content

History: Upgrade 1.9.x to 2.x

Source of version: 25 (current)

Copy to clipboard
            ^((Needs review)). ((screenshot))s need to be updated to latest 2.0.^

! 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)^
 .
!! ~~#FF0000:First ((backup|Backup)) whole filesystem and database~~
!! Upgrade:

Download the tar-ball as [http://dev.tikiwiki.org/Download|tar.bz2] or [http://dev.tikiwiki.org/Download|zipped file]
or use the [http://dev.tikiwiki.org/tiki-index.php?page=SVNTips|svn version] 
{CODE()}
svn co https://tikiwiki.svn.sourceforge.net/svnroot/tikiwiki/branches/2.0
{CODE}

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 [http://7-zip.org/|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=__~~red:XX~~ to have the installation messages in a ~~red:language~~ other than English, if it has been translated already) to login as admin
+ ^{img src="img/wiki_up/20_install_01.png" } %%% {img src="img/wiki_up/20_install_00.png" }^
+ After that, you will see the main install & upgrade screen
+ ^::{img src="img/wiki_up/20_upgrade_01.png" } ::^
# 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)
+ ^::{img src="img/wiki_up/20_upgrade_01b.png" }::^
# Click on "__Do nothing and enter Tiki__", at the bottom of the page
+ ^::{img src="img/wiki_up/20_upgrade_03.png" }::^
# 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 [http://doc.tikiwiki.org/Backup|complete list of directories]
# Run tiki-install.php to upgrade the database or run
{CODE()}
sh doc/devtools/sqlupgrade.sh
{CODE}
# Clear the cache

!!Remarks
^__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.
^::{img src="img/wiki_up/20_install_upgrade_01.png" }::^


!!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)