Podręcznik:Update.php
Plik MediaWiki: update.php | |
---|---|
Lokalizacja: | maintenance/ |
Kod źródłowy: | master • 1.41.1 • 1.40.3 • 1.39.7 |
Klasy: | UpdateMediaWiki |
Szczegóły
Skrypt konserwacyjny update.php sprawdza, czy schemat bazy danych MediaWiki wymaga aktualizacji, aby działał z aktualną wersją MediaWiki.
Powinieneś uruchomić update.php
po każdej aktualizacji MediaWiki lub po aktualizacji lub instalacji rozszerzeń, które wymagają zmiany schematu bazy.
Większość takich rozszerzeń wspomina o tym w swojej dokumentacji.
W przeglądarce
Jeżeli nie masz dostępu do wiersza poleceń swojego serwera, użyj aktualizatora webowego do uruchomienia tego skryptu aktualizującego.
Z wiersza poleceń
Z wiersza poleceń, SSH lub podobnego:
- Przejdź do katalogu
maintenance
- Uruchom skrypt aktualizacyjny:
$ php update.php
$ mwscript update.php
Parametry
This script offers several parameters (generic, script dependent and script specific) which may be required in some wiki environments.
Generic maintenance parameters
--help
- used to get a prompt of all available script parameters (generic, script dependent and script specific) together with short explanations of their usage. Są to rzadziej stosowane parametry.
--wiki wikiId
- update wiki family if database name depends on virtual host, where wikiId - database name (e.g. enwiki, dewiki ...)
Script specific parameters
--quick
- skip countdown sequence
--nopurge
- (usunięto w 1.36) do not purge objectcache table. Normally
update.php
purges the objectcache table (generally contains the parser cache and the messages cache), msg_resource and msg_resource_links (these are used for ResourceLoader message caching and are cleared in 1.21 and later) tables in the database, if you don't want to purge this table, use the--nopurge
option. --doshared
- Update shared tables as well.
--force
- Uruchamia skrypt, nawet jeśli jest wyłączony w opcjach konfiguracyjnych.
--conf
- Specifies the config file (the LocalSettings.php file for the specific wiki). Used for wiki families.
--noschema
- All changes to the table structure or table additions are skipped. Only data changes are made.
--schema
- No schema changes are made to the database, but the schema changes are saved to a separate SQL file that can be run.
--skip-compat-checks
- Skips compatibility checks (usunięto w 1.41), Gerrit change 851684
--skip-external-dependencies
- when using composer.local.json to let Composer install extensions and their dependencies, you may see an error message saying that there is a mismatch between the installed and required version (e.g. "mediawiki/semantic-breadcrumb-links: 1.3.0 installed, ~1.3 required"). Możesz użyć tego parametru, aby zignorować komunikat i niezależnie od tego uruchomić update.php.
Extensions can install/update their schemas using LoadExtensionSchemaUpdates hook.
Zobacz też
- For detailed instruction on using
update.php
, see Podręcznik:Aktualizowanie , Manual:Upgrading#Command_line