Manual:Upgrading to 1.11/pl
Wersja stabilna (MediaWiki 1.42 )
- mediawiki-1.42.3.tar.gz
- mediawiki-1.42.3.zip
- Gałąź w Git: REL1_42
Starsze wersje (MediaWiki 1.41 )
- mediawiki-1.41.4.tar.gz
- mediawiki-1.41.4.zip
- Gałąź w Git: REL1_41
Wersja alfa (MediaWiki 1.44 )
More information:
Lato. To świetny czas, pełny słońca na konferencję Wikimaniaków i rzecz jasna na nową wersję MediaWiki. Weź lody i się zrelaksuj; damy klasyczny podręcznik jak zaktualizować MediaWiki do wersji 1.11.
Co zrobimy
[edit]Po pierwsze, przeczytamy plik tekstowy UPGRADE dołączony do 1.11.
We wszystkich upgrade-ach MediaWiki, podstawowe kroki są takie same:
- Sprawdzanie wymagań
- Przeczytanie listy zmian
- Zrobienie backup-u istniejących plików i bazy danych
- Rozpakowywanie nowych plików
- Uruchamianie skryptu instalacyjnego
- Aktualizowanie dodatków
- Sprawdzanie upgrade-a
Sprawdzanie wymagań
[edit]MediaWiki 1.11 wymaga:
PHP
[edit]- PHP 5.0.x lub lepszy (PHP 5.0.x tylko na 32-bitowych platformach)
- Zalecane jest użycie PHP 5.1.x lub 5.2.x.
- Notatka o PHP 5.0.x uruchamianym na 64-bitowej platformie sprawiającej poważne problemy z MediaWiki. Jeżeli uruchamiasz pod x86_64 (AMD64, EMT64) lub innej 64-bitowej platformie, PHP 5.1.x lub 5.2.x jest wymagany.
Baza danych
[edit]- MySQL 4.0.x lub lepszy
- Wersja 3.x nie jest obsługiwana od wersji 1.6.0
lub
- PostgreSQL 8.1 lub lepszy
- Wymagane moduły to:
tsearch2
iplpgsql
- Wymagane moduły to:
Przeczytanie listy zmian
[edit]FRAGMENT DO ZROBIENIA
Within the distribution tarball, or within the files checked out/exported from SVN, there are a number of files with capitalised filenames, one of which contains the RELEASE-NOTES. Now's the time to open it up and find out what's been changed in 1.11. – You can also read them at Release notes/1.11.
Back up existing files and the database
[edit]FRAGMENT DO ZROBIENIA
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:
- the wiki's content, from the database. It may be a good idea to create an XML dump in addition to the SQL database dump.
- images and other media files (the contents of the
images
directory) - configuration files, i.e.
LocalSettings.php
andAdminSettings.php
(if present) - MediaWiki's program files, including all skins and extensions, especially if you modified them.
See Manual:Backing up a wiki for instructions.
Unpack the new files
[edit]FRAGMENT DO ZROBIENIA
If using a tarball package, decompress it; if using Subversion, export the files into a clean location. Replace all existing files with the new versions from 1.11, preserving the directory structure. The core code is now up to date.
Run the update script
[edit]FRAGMENT DO ZROBIENIA
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, although 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.
Alternative 1: 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
Alternative 2: Re-run the installer
[edit]An alternative to running the update script from the shell is to re-run the web installer. To do this:
- Rename
LocalSettings.php
toLocalSettings.old.php
- Make the
config
directory writable by the web server - Make sure the database user has full rights to the database
- 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.
- Delete the new configuration file
- Rename
LocalSettings.old.php
back toLocalSettings.php
- Restore permissions on the
config
directory
Upgrade extensions
[edit]FRAGMENT DO ZROBIENIA
Certain extensions have been updated in order to work with MediaWiki 1.11. Be sure to upgrade to the latest versions of such extensions. You might need to perform manual updates to custom extensions.
Test the update
[edit]FRAGMENT DO ZROBIENIA
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.