Manual:Upgrading to 1.8/ru


Скачать установочный пакет

Стабильная версия (MediaWiki 1.41 )

Наследуемые версии (MediaWiki 1.40 )

Альфа-версия (MediaWiki 1.42 )

Дополнительная информация:

Разработчики MediaWiki очень трудолюбивы :-) Новая версия MediaWiki 1.8 несёт новые приятные возможности, ура! А Вы до сих пор используете раннюю версию? Итак как же её обновить?

Это руководство поможет пользователям версии 1.7 гладко обновиться до версии 1.8. Также руководство будет полезным для пользователей ветки 1.6.

Кратко edit

Для начала прочитайте текстовый файл UPGRADE из дистрибьютива MediaWiki 1.8.

Как и раньше, порядок обновления MediaWiki примерно такой:

  1. Проверить требования для установки
  2. Прочитать что нового в версии 1.8
  3. Сделать резервную копию существующих файлов и баз данных
  4. Распаковать новые файлы
  5. Запустить сценарий обновления, чтобы проверить базу данных
  6. Обновить модули расширения
  7. Проверить как прошло обновление

Что нужно для установки? edit

MediaWiki 1.8 требует:

  • PHP 5.0 или старше (рекомендуем 5.1)
    PHP 4 не поддерживается с версии 1.7
  • MySQL 4.0 или старше
    MySQL 3.x не поддерживается с версии 1.6

Что нового в версии 1.8? edit

В дистрибьютиве MediaWiki существуют специальные файлы с именами большими буквами, один из которых RELEASE-NOTES. Сейчас самое время открыть его и прочитать что изменилось в версии 1.8.

Резервная копия существующих файлов и баз данных edit

While the upgrade scripts are well-maintained and robust, things could still go pear-shaped. Before proceeding to update the database schema, make a full backup of the wiki, including both the database and the files.

База данных edit

Прежде чем запускать скрипты обновления обязательно сделайте полную резервную копию Вашей wiki-базы! Это основная мера предосторожности на случай если обновление параметров базы пройдёт с ошибками, что может повредить записи в базе данных. Для резервного копирования базы данных существуют специальные утилиты, такие как MySQL dump, поставляются вместе с программным обеспечением MySQL.

Настройки edit

Сделайте копию Вашего файла LocalSettings.php, в котором содержатся основные настройки, а также любые улучшения, что были сделаны в MediaWiki.

Загруженные файлы edit

If uploads are enabled in the wiki, then you will also need to back up the upload directory. By default, this is the images directory, although the path to this may have been changed in LocalSettings.php.

Расширения и собственное оформление edit

Сделайте резервную копию каталога extensions, а также всех файлов или каталогов, содержащих Ваши улучшения по оформлению.

Распаковка новых файлов edit

If using a tarball package downloaded from SourceForge, decompress it; if using Subversion, export the files into a clean location. Replace all existing files with the new versions from 1.8, preserving the directory structure. The core code is now up to date.

Запуск сценария обновления edit

Note: Make sure there's an AdminSettings.php file in the wiki root, and it's got up to date information in it. The user needs full permissions on the database.

The preferred method of performing the update is using the command-line maintenance script, however, it is also possible to re-run the web-based installer.

Shell edit

From the command line, or an SSH shell or similar, change to the maintenance directory and execute the update script:

$ php update.php

MediaWiki will inspect the existing schema and update it to work with the new code, adding tables and columns as needed. If upgrading from 1.5.x, once this is complete, you are advised to run the refreshLinks.php script to update the link tables.

Альтернатива: phpShell edit

If shell access is not available, look at options such as phpShell, which emulates a command prompt using PHP functions. This might not work on some locked-down hosting setups.

When using such a solution, it is often desirable to skip the countdown period at the start of the script. Pass the --quick option to the update script to do so:

$ php update.php --quick

Переустановка edit

An alternative to running the update script from the shell is to re-run the web installer. To do this:

  1. Rename LocalSettings.php to LocalSettings.php.old
  2. Make the config directory writable by the web server
  3. Browse to the wiki and start the installer

Fill in the form fields with the same values as was done during the previous version's installation. When the installation process starts, the script will detect existing MediaWiki tables, and upgrade their schema. When this is complete, a new LocalSettings.php will be generated.

  1. Delete the new configuration file
  2. Rename LocalSettings.php.old back to LocalSettings.php
  3. Restore permissions on the config directory

Обновление расширений edit

Certain extensions have been updated in order to work with MediaWiki 1.8. Be sure to upgrade to the latest versions of such extensions. You might need to perform manual updates to custom extensions.

Проверка обновления edit

Once the upgrade has completed, browse to the wiki and check basics such as viewing and editing pages to ensure things still work as expected.

Visit Special:Version and check that the version shown is correct.