Loading...
 
Skip to main content

History: Aktualisieren

Preview of version: 1

Die Übersetzung der Seite ist unvollständig.

Deine Tiki Site Aktualisieren

Die Aktualisierung von Tiki ähnelt sehr der Installation. Aktualisieren funktioniert nur in eine Richtung. Es gibt keine Möglichkeit wieder auf eine kleinere Version zurückzustufen, es sei denn durch Einspielung einer Datensicherung. Bevor Du eine größere Aktualisierung durchführst (z.B. von 5.x auf 6.x) solltest Du einen Test mit einer Datensicherung durchführen bevor Du mit der "echten" Aktualisierung beginnst.

Benötige ich eine Aktualisierung?
Es kommt darauf an. Einige Tiki-Versionen werden als Long Term Support, LTS geführt. Dies bedeutet, dass Entwickler nach wie vor Sicherheitspatches und Fehlerbehebungen für diese Version erstellen. Wenn Du nur auf Sicherheitsgründen aktualisierst, kannst Du bei Deine LTS Version bleiben. Hauptaktualisierung bringen neue Funktionen. Existierende Funktionen, Themes, Plugins und Module können aber ggf. nicht mehr so funktionieren wie vorher. Eine Testaktualisierung wird daher dringend empfohlen. Aktualisierung innerhalb eines Zweiges (mit der gleichen Versionsnummer) verursachen nur selten Probleme und werden aus Sicherheitsgründen empfohlen.

Overview: How an upgrade works
  1. Backup all the files and database from your current installation.

  2. Reinstall the new version, preferrably into a empty folder.

  3. Copy any custom files (css, uploaded files and images, custom templates) from your backup.

  4. Run the installer (tiki-install.php) which upgrades the database


Do I really need to download and then upload the whole thing? - For some upgrades a "patch version" is available, if only a few files have been modified.

Alternatives to FTP: Rather than downloading and re-uploading the whole package, use commands svn or wget (ask your hosting provider) to move the files directly from SourceForge to your server.

1.1. Determine the version of your current Tiki

You can check by visiting tiki-admin.php?page=general

If your current Tiki is less than 1.9.0Tiki 1.9.0 was released on 2005-04-27 so it's highly unlikely that you still are running one. Older data upgrades scripts were removed from Tiki but are still available to download.: You need to upgrade to 1.8 first: Upgrade 1.7 to 1.8 and then, Upgrade 1.8.x to 1.9.y (do not upgrade directly from 1.7.x to 1.9.x or later)

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 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.

Deactivate custom themes: custom themes and custom .tpl files from older versions are unlikely to work and may cause an upgrade failure. Deactivate custom themes by on your new install by changing the name of the active css file, so it will not be found by tiki - which causes it to revert to the default theme.

1.2. Determine to which version you want to upgrade to

Keep in mind that Tiki3 and Tiki6 are versions kept as Long Term Support (LTS) and that it's always safer to upgrade to the latest release in that branch. Use version 4.1 (i.e. 4.1 instead of 4.0) if you are running production sites with extensive usage of many features.


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").

1.3. Fresh install or Install over existing?

You will need to manually move and/or re-integrate any data that is not stored in the MySQL database, for example images and attachments saved as files. This is the recommended process, specially if you have a custom theme style, or one theme style not supported by the new tiki version you are going to use.

This will not delete any Tiki file which was used in previous versions, but are not longer needed. These files shouldn't do anything except waste a bit of disk space, except for the case of template files (.tpl files under ./templates or subfolders). You can use Security Admin to detect leftover PHP files.

This is not recommended because you are keeping all files from previous tiki versions, which may include old-fashioned tpl files, might conflict with the new version specially in theme styles which have changed or which are not supported any more in the new version of Tiki. That's why the best option to avoid any potential conflict is to install a new tiki on a new directory, and replace the old one with the new one, plus re-insert the custom files that you need (img/wiki_up, modified tpl files once you now that they are updated to the new Tiki version, etc). See below at "Fresh Install".

If it's a minor release (5.1 to 5.2), it's unlikely to cause any issues because templates don't change much and there are just bug fixes.

1.4. Create a Backup


You need to backup

  1. Your entire folder where Tiki is installed (and all subfolders)
  2. Your MySQL database

See: Backup for details

1.5. Update your files

Tiki files are distributed in a compressed archive (ex.: .zip). You need to unpack (unzip) the files and upload them to your web server.

Fresh install

Instead of copying over your old files, you can make a 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, ...): 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.


Things that you may need to copy from your old site to your new site:

  • img/wiki_up folder content (uploaded wiki images)
  • any customized *.tpl files
  • any customized styles ( *.css )
  • any file gallery directories if using the file system to store the files
  • any image gallery directory if using the file system to save the images
  • Any customized code
    • If you make changes which can be useful to others, please consider joining the Tiki community and sharing your enhancements. Beyond helping others, you no longer will need to re-instate and maintain your enhancements at each upgrade. Please see How to get commit access. 😀


Database Collation

In case you are upgrading but in a new server, and thus, you need to create a new database first, please ensure that you create your new database with utf8 collation.

  • Note: By default, Tiki uses UTF-8 for your database encoding. We strongly encourage you to select "utf8" in the "collation" drop-down box in phpmyadmin (or similar), in the field shown in the following image:
    Image


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.

Install over existing

To upgrade, copy or upload all the files of the newer version onto the files of the older version so any older ones are replaced (FTP with "overwrite if source is newer").

Before overwriting the files, remove the non-customized style-specific templates (templates/styles/*, and templates/yoursite/* if any). Previous versions often contained per-style modifications. Those files have since been removed from standard distribution, leaving the old files intact and not taking advantage of enhancements.

Updating via SVN

If you install using SVN, you can easily update via SVN -> Get Code

1.6. Check permissions

1.6.1. File and Folder permissions

If your server is unhappy with Tiki file and folder permissions (this is dependent on server configuration), you may get an error message or blank pages. These failed attempts are typically in the error log (ask your web host to know where they are as it's different depending of your setup)

Too few permissions
If a message appears indicating that specific directories are not writable, you will need to change the permissions on the indicated directories. Tiki will attempt to verify that it can read (and write) to all necessary directories. This error message will include instructions about how to resolve the issue.

Too many permissions
If you are getting Internal Server Error 500, blank pages or similar, it could be that the permissions on the files are not appropriate for your webhost.

If your permissions are currently at "777", use your FTP client to change the files to "755". If Tiki is installed in a directory, make sure to also change the permission of the folder which contains the tiki files.

If you have shell access, you can run:

Copy to clipboard
sh setup.sh

and answer any questions. If you don't know what to answer, just click "enter" to keep the defaults.

Copy to clipboard
root@yourserver:/var/www/tiki# sh setup.sh Tiki setup.sh - your options ============================ Composer: If you are installing via a released Tiki package (zip, tar.gz, tar.bz2, 7z), you can and should skip using Composer. If you are installing and upgrading via SVN, you need to run Composer after 'svn checkout' and 'svn upgrade'. More info at https://dev.tiki.org/Composer c run composer and exit (recommended to be done first) For all Tiki instances (via SVN or via a released package): f fix file & directory permissions (classic default) o open file and directory permissions (classic option) S clear screen predefined Tiki Permission Check models: ---------------------------------------- 1 paranoia 2 paranoia-suphp w suphp workaround 3 sbox W sbox workaround 4 mixed 5 worry 6 moreworry 7 pain 8 morepain 9 risky a insane q quit x exit There are some other commands recommended for advanced users only. More documentation about this: https://doc.tiki.org/Permission+Check Your choice [f]?


The option preselected in "Our choice" will initially be "c", to run "composer" script and get the required php dependencies for you. and in a second step, it will suggest "f", to fix file and directory permissions (classic default option). You can choose at any time the letter that best suits your needs, among the options offered.

If "sh setup.sh" doesn't work for you, you may try, in your ./tiki/ directory

Copy to clipboard
chmod -R 777 ./db ./dump ./img/wiki ./img/wiki_up ./img/trackers ./modules/cache ./temp ./temp/cache ./temp/templates_c ./templates ./styles ./whelp/

Another way is to set permissions for all directories and then set permissions for all files. For example, to set the permissions for all directories to 777 and the permissions for all files to 644, use the following separate commands through shell access:

Copy to clipboard
find [YOURDIR] -type d -exec chmod 777 {} \; find [YOURDIR] -type f -exec chmod 644 {} \;

After correcting any directory or file permission problems, visit tiki-install.php to continue.

1.6.2. SuPHP Problems

Systems with SuPHP need permissions 755 at maximum. Group must not be allowed to write. This includes the complete path in the filesystem, not only document root of the webserver. Wrong permissions may lead to 500 Internal Server Error here. On the other hand less permissions (namely 750 without x/execute/subdir entry for webserver) may lead to 403 Forbidden Error.

1.6.3. Permission Matrix

Several usecases and minimum to maximum permissions you may try if something doesn't work properly. Permissions refer to data directly accessed by the webserver (files included by Tiki itself may and should have less permissions):

Ownership
username:groupname
no SuPHP
files / subdirectories
with SuPHP
files / subdirectories
webserver:webserver
600 - 666 / 700 - 777
?
user:user
604 - 666 / 705 - 777
600 - 644 / 701 - 755
user:webserver
660 - 666 / 770 - 777
?
webserver:user
660 - 666 / 770 - 777
?

1.6.3.1. Option

For your consideration
Copy to clipboard
find . -type d -exec chmod 755 {} \; ; chmod 755 . ; find . -type f -exec chmod 755 {} \; ; chmod 751 db/local.php

1.6.3.2. Option

The following commands might be useful. In particular, it might help you use an IDE (PhpStorm), etc:

For your consideration
Copy to clipboard
$ export PathToTiki="/var/www/tiki" $ export WebServerOwner="www-data" $ sudo usermod -aG ${WebServerOwner} $(whoami) $ sudo chown -R ${WebServerOwner}: ${PathToTiki} $ sudo chmod -R g+rw ${PathToTiki}

In English, the above code adds you to the web-server group; forces the tiki tree to be owned by the web-server user and group; and then makes sure the tiki tree is readable and writable by the web-server group (you). Suggestions welcome!



After correcting any directory or file permission problems, visit tiki-install.php to continue.

1.7. 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

Fix the encoding issue

 Upgrade from previous to 5.1 to 5.1 or newer

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.

1.7.1.1. 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
    Click to enlarge
    Click to enlarge
    • 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.
      Click to enlarge
      Click to enlarge

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

1.7.1.2. 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.
    Click to enlarge
    Click to enlarge
  • 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.
    Click to enlarge
    Click to enlarge


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

1.7.1.3. 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?"
    Click to enlarge
    Click to enlarge
  • 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 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 Support channels.

Alternative: Upgrading your database through shell

[+]

1.8. Post tiki-install.php

At the end, proceed as usual to the Tiki site while disabling the tiki-install.php script.

1.9. Update the .htaccess file

Tiki ships with a _htaccess file. It needs to be renamed to .htaccess and replace the one from the previous version. If you made any customizations, you should redo them in the new file. See: Clean URLs

1.10. Test

What to expect as problems

  • Changes of behavior
    • A feature was activated but no longer is (ex. default behavior has changed). You need to go to the admin panel and activate it.
  • Bugs
    • Each Tiki version brings loads of new features. However, sometimes, enhancements can bring new bugs as well 😊
  • If you customized your themes, they may come out weird
    • You should plan a bit of time to re-integrate your customizations in the new theme.
  • If you've upgraded your MySQL server from 4 to 5, when you login for the first time, you may get an "Account disabled" error. To repair this:
    Copy to clipboard
    mysql -u user_dbuser -p user_dbname -B -e "update users_users set waiting=NULL where waiting is not NULL and valid is NULL;"

Where to look

  • Look in the release notes of your version for any specific things to look for, and to the documentation pages of each new release (i.e. Tiki2, Tiki3, Tiki4, Tiki5, Tiki6 ...)

What to do




1.10.1. Check your content

Check if your new web site contains everything from the old website.

1.10.2. Check that the features you used to use are still turned on.

More specifically, structures, search, individual plugins, and some other features may have to be activated in the admin panel.

1.10.3. Revise potentially unsafe plugin calls and approve or reject them

Usage of potentially unsafe wiki plugins has to be validated by users with the new permissions related to approve plugins. This way, any usre can make any attempt to use potentially any plugin, including iframe, dbreport, tag, sql, snarf, regex... which would need to be validated by some trusted users/editors/admins later on in order to approve or reject them.

A list of plugin calls pending revision can be found at any time here: tiki-plugins.php

1.11. Upgrade your Theme

Revise the notes at
http://themes.tiki.org/Upgrading


For a more detailed description, read Styles and Themes

Further help?

If you need further instructions, ask in IRC or in the forums, and please, come back here and upgrade the documentation with what you learned. This is a way for you to help and make it easier for new users .

Related pages


Alias


Notes for advanced users

[+]

History

Information Version
Josue Zirimwabagabo 12
Josue Zirimwabagabo 11
Torsten Fabricius fix auto-Jumbotron 10
Torsten Fabricius Changed WikiSyntax Box to PluginRemarksbox, to make use of the auto-Jumbotron for the first text 9
sumopi 8
Gregor (gta74) 7
Gregor (gta74) 6
Gregor (gta74) 5
Gregor (gta74) 4
Gregor (gta74) 3
Gregor (gta74) 2
Gregor (gta74) 1