Loading...
 
Skip to main content

History: Upgrade from unmaintained versions

Source of version: 2 (current)

Copy to clipboard
            Yo have a Tiki version earlier than the minimum version which is currently supported?
You might find some useful tips here related to old unmaintained versions of Tiki.

!!# Determine the version of your current Tiki
You can check by visiting -+tiki-admin.php?page=general+-

!!! If you have 3.x or later
You can upgrade directly. Tiki 4.x/5.x/6.x/7x./8.x/9.x/10.x/11.x/12.x include all the database migration scripts to that version. You may wish to manually re-run the installer script for the version you are on, and watch for unexpected errors.

!!!- If you have 1.9.x or 2.x
Tiki 1.9.0 was released on 2005-04-27 so it's unlikely that you still are running one.

From 1.9.0 and more recent to any subsequent version (3.x, 4.x, etc): You can upgrade directly. Tiki 3.x/4.x/5.x/6.x/7x./8.x/9.x includes all the database migration scripts from 1.9.0 to that version. You may wish to manually re-run the installer script for the version you are on, and watch for unexpected errors.

''However'', if you are having trouble with a database upgrade of anything prior to 3.0 (so including 1.9 and 2.0, especially if it started life before 1.9) it is recommended you upgrade to 3.x (currently 3.8) first and then to your final version.

There is a bug when you upgrade from old versions directly to 9.0 (this is solved in soon-to-be-released 9.1).
* Use pre-9.1, from ((dev:Daily Build)) until 9.1 is officially released
* or upgrade from 3.x to 6.x to 9.x 

If you are upgrading from 1.x releases it is likely that you are also upgrading the version of MySQL.  One of the major changes to modern releases of TikiWiki is a change to utf8 encoding.  You may experience issues with corrupted text on pages and even the inability to edit pages.  One important upgrade step is to skip the default MySQL encoding conversions.  If you plan to upgrade by dumping your older MySQL database, moving to a new installation, the restoring the database you may be able to skip [http://www.bluebox.net/news/2009/07/mysql_encoding/|Getting out of MySQL Character Set Hell] by using the MySQL dump option "--default-character-set=latin1" when dumping the original database.  Unless you should also perform the "fix double encoding" step at the very end of the installation unless you change your [http://forums.mysql.com/read.php?103,28072,28072|my.cnf] to force utf8 encoding.

!!!- If you have 1.8.x
Tiki 1.8.0 was released on 2004-02-08 so it's highly unlikely that you still are running one.

You need to ((Upgrade 1.8.x to 1.9.y)), and then, follow the instructions for a 1.9.x site

!!!- If you have 1.7.x
Tiki 1.7.0 was released on 2003-08-01 so it's highly unlikely that you still are running one.

You need to upgrade to 1.8 first: ((Upgrade 1.7 to 1.8)) and then follow the instructions for a 1.8.x site

!!!- If you have 1.6.x or older
You need to run the upgrade scripts for each version, manually or by installing a Tiki of that version.

!! Only-changes release files
In some cases of new releases (such as 6.3, for instance), you have the option to download and install only the files that have changed (from a compressed file, like: "tikiwiki-inc-6.2-to-6.3.tar.gz"), or to download the full new version (eg. "tikiwiki-6.3.tar.gz").

!!# Fresh install
If you are upgrading to a version previous than Tiki 5.1, you can indicate the database information of your previous Tiki install (info in db/local.php). 

^__Note for Tiki versions after 5.1 (5.3, 6.0, 9.x, 12.x ...)__:
You are encouraged NOT to manually copy or edit your old local.php into the new site, but let the Tiki installer script (tiki-install.php) create that local.php file when needed in a later step since it will handle properly the former encoding issue for you. ^

__Database collation__

During the upgrade to Tiki 5.1 (or later) through tiki-install.php, Tiki will attempt to do this for you if needed, but in some rare cases Tiki fails to set the collation to utf8, and therefore, you have to do that manually. If the database is already created with latin1 collation, and you want to change that afterwards, you can change the collation through phpmyadmin  in the "__Operations__" tabs once you have selected your database.

!!# tiki-install.php to update your database

!!! (A) Fresh install
On the -+tiki-install.php+- page of this ''new'' site, connect to the same database as your ''old'' site (you can find this info in the file -+db/local.php+- of your ''old'' site) and follow the instructions to upgrade your site. Make sure to click upgrade and not install, else you wipe out your database. 

^__Note__:
For upgrades to versions equal or later than 5.1 (5.3, 6.0, ...), you are encouraged to re-set the connection settings, while keeping the "Force utf-8 connection" option checked, and follow the on-screen instructions.^

For upgrades to earlier branches and versions (like any of the Tiki3 LTS branch), you can alternatively just copy -+db/local.php+- from your old site to your new site, to avoid entering the information if you wish.

!!! (B) Install over existing
Then, go to tiki-install.php and click the "upgrade" button, which will update the database. Tiki can read your previous -+db/local.php+- file and use this information. 

^__Note:__ 
However, for upgrades to versions equal or newer than 5.1 (5.3, 6.0, ...), you are encouraged to re-set the connection settings, while keeping the "Force utf-8 connection" option checked, and follow the on-screen instructions.^

If the installer was previously locked (which it should be), you will need to unlock it by deleting -+db/lock+- file. 


!!!- If the installer fails . . . 
On some very old versions of tiki it may be possible that the installer will fail, with an error like this . . .

^Fatal Error: Call to a member function fetchRow() on a non-object in (some path)/installer/schema/(some file name here) on line (some number)^

This is because perhaps tiki is applying a DB patch to get rid of something that is already gone. Try skipping that file in the upgrade sequence. To do this, you need to insert the filename that produced the error e.g. "20090923_mod_change_directory_defaults_tiki" and a date value (corresponding to the date in the file) as a row in table tiki_schema in your database. Thus the execution of that patch will be skipped by the installer. Try the installer again. You may have to do this with multiple patches.  

{ANAME()}Fix_the_encoding_issue{ANAME}{ANAME()}Fix the encoding issue{ANAME}

!!! If you need to fix the encoding issue
{REMARKSBOX(type="note",title="Upgrade from previous to 5.1 to 5.1 or newer",highlight="n",close="n",width="100%")}

!!!! Either (A) or (B): fix the encoding issue (5.0 or before -> 5.1 or later)
Previously to Tiki 5.1, some users might have had a double encoding issue in the database of their Tiki. To ensure that this potential problem is fixed for all, if you are upgrading from a Tiki version equal or earlier than 5.0, into some newer Tiki version (5.1, ...5.x; 6.0, 6.x...), you are encouraged to follow once the three steps to fix the issue by means of the __tiki-install.php__ script.

!!!!# Export existing database from earlier releases (< 6.0)
When dumping MySQL databases from earlier versions of TikiWiki you should specify "--default-character-set=latin1 " to ensure that your MySQL client does not double encode any existing latin1 data.

!!!!# Force connection to utf-8 in db/local.php
Briefly explained above. For the sake of clearness, covered here in detail.

* Go to tiki-install.php, and follow steps until step 4: "__Set the Database Connection__". 
* Even if you have a local.php file already there, click on "__Modify database connection__" instead of "Use Existing Connection". This will open a form in the lower part of the window for you
+ {img src="dl343&display" thumb="y" alt="" rel="box[g]" width=400 desc="Click to enlarge" styleimage="border" imalign="center"} 
** At the bottom, there will be a section called "Character set", with a checkbox called "__Always force connection to use UTF-8__", that needs to be kept as checked. 
++ {img src="dl344&display" thumb="y" alt="" rel="box[g]" width=600 desc="Click to enlarge" styleimage="border" imalign="center" }
+ Fill in your db/local.php details through that form, and click on the "Continue" bottom at the bottom when ready.
* Continue to step 5 in the installation process, where you'll have the opportunity to "__Convert database and tables to UTF-8__" (see below).

!!!!# Convert database and tables to UTF-8
In step 5 of the installation process, you will be offered the option to "__Convert database and tables to UTF-8__", and you will be also shown the current encoding of your database. 

* Write down the name of the current encoding of your database, because you will need it in the next step below. 
+ {img src="dl345&display" thumb="y" alt="" rel="box[g]" width=400 desc="Click to enlarge" styleimage="border" imalign="center" }
* You can now click on the button "__Convert database and tables to UTF-8__".
* Once successfully performed, you will not see this option anymore, but just the usual question of whether you want to Re-install the database, or "__Automatically upgrade your existing database to__" your new Tiki version.  Choose this later option, since you are upgrading.
+ {img src="dl346&display" thumb="y" alt="" rel="box[g]" width=400 desc="Click to enlarge" styleimage="border" imalign="center" }

(Note: This step is converting you DB collation to utf-8, and your DB tables to use the utf-8 charset also.)

!!!!# Convert content from your previous encoding to utf-8
Finally, you need to convert the content from your existing database (content from wiki pages, etc., but also preferences, which include paths to file and image attachments, like in image galleries, etc.) to utf-8. 

* To do so, you have an option in the final step under the section "__Upgrading and running into encoding issues?__"
+ {img src="dl347&display" thumb="y" alt="" rel="box[g]" width=400 desc="Click to enlarge" styleimage="border" imalign="center" }
* In the dropdown called "__Previous table encoding__", choose the one which applies to your case (you wrote it down in the previous step), and click on the button: "__Dangerous: Fix double encoding__" 

Given the nature of this fix, it's best to do some quick ((Encode fix verification|verification)) of the changes.

Congratulations! You are done. 

You can now enter Tiki locking the installer (recommended) or without locking it, and continue using Tiki as normally.

If you have any issues, provide feedback through the usual ((tw:Support)) channels.
{REMARKSBOX}

!!!- Alternative: Upgrading your database through shell
''Upgrading your database manually through shell (faster than PHPMyAdmin)''

^__Note__:
If you upgrade from a version earlier to Tiki 5.1 to a version of Tiki5.1 or newer, you are encouraged to run at least once the __tiki-install.php__ script as explained above, so that you fix the encoding issue that may exist in your database previous to Tiki 5.1.^

Assuming you have the command line version of PHP (PHP-CLI), you can simply use the command line version of the installer.
{CODE()}
[www]$ php installer/shell.php
Running installer for: db/local.php
        Patches installed:
                20090811_quizzes_tiki
        Queries executed successfully: 3686
[www]$
{CODE}


For multi-tiki installations, the dev script can be used. PHP-CLI is still required.
{CODE()}
  sh doc/devtools/sqlupgrade.sh
{CODE}


If you are updating your database this way instead of tiki-install.php, you should clear your cache  (which tiki-install.php does)

!!# Upgrade your Theme
{VERSIONS(nav="y",title="General notes",default="newer")}
Revise the notes at
https://themes.tiki.org/Upgrading
---(4.x)---
Read the following guidelines:
https://themes.tiki.org/Stylesheet+changes+from+Tiki+3+to+4

And if you are upgrading from 2.x or earlier, read also the following page:
http://themes.tiki.org/Stylesheet+changes+from+Tiki+2+to+3

---(3.x)---
The layout system of the Themes' styles in Tiki 3 (table-less) has changed from previous versions of Tiki (table-based). So you'd better start playing with one of the bundled themes in your Tiki 3 installation, and fine tune your CSS to meet your needs (and/or past Theme style design), because you might not need to adapt your *.tpl files to it. 

And in case you need to adapt them, you might find it easier to update the new tpl files with the modifications you need, than to start from your old tpl files and attempt to apply all the changes in the display that were introduced in Tiki 3.

For more information, please see: ((Upgrade 2.x to 3.x)) 
---(2.x and 1.9.x)---

If your site uses a custom theme, you will need to copy all the appropriate CSS files and the image folder from the /styles folder, the custom templates from the templates/styles folder, and upgrade your CSS to include any new classes. Between releases, ((CSS)) classes are often added to accommodate new features. You will find the list of the changes in the directory styles/transitions/ in the downloaded install package. These are named something like version_to_version.css. To update your CSS file, add the new classes and update the line at the top of your file that gives the version of your current Tiki's CSS. For instance
@version:1.9
{VERSIONS}

!!! Delete Unused Tables
When upgrading, some tables may no longer be used if the related feature has been discontinued. The upgrade script doesn't delete these extra in case users have data in them they want to keep. You can delete the tables manually if you have access to the database on the server. The following tables are no longer used as of ((Tiki5)):
* The 10 galaxia tables
* The 4 tiki_chart or tiki_charts tables
* tiki_drawings
* tiki_newspaper_marks
* tiki_newspaper_servers
* tiki_quicktags