Kézikönyv:Update.php
Outdated translations are marked like this.
MediaWiki-fájl: update.php | |
---|---|
Könyvtár: | maintenance/ |
Forráskód: | master • 1.43.1 • 1.42.6 • 1.39.12 |
Osztályok: | UpdateMediaWiki |
Részletek
Az update.php ellenőrzi, hogy szükséges-e az adatbázis-szerkezet frissítése az aktuális MediaWiki-verzióval való működéshez.
Mindig le kell futtatnod az update.php
szkriptet, ha frissíted a MediaWikit, vagy olyan kiterjesztést telepítesz, amely igényli ezt.
Most extensions that require schema updates will say so in their documentation.
A karbantartószkript letiltható a $allow használatával (az 1.18.0 verzióban a $miser-dal). Nagyon nagy adatbázisokkal rendelkező wikiknél fontos az elővigyázatosság, de ha nem vagy benne biztos, hogy ez vonatkozik-e rád, akkor valószínűleg nem kell vele törődnöd. People with extremely large and busy wikis may need to do upgrades with care, but if you're not sure if that applies to you, then it probably doesn't.
Usage
A böngészőből
Ha a szerveren nincs parancssori hozzáférésed, a webes frissítőt is használhatod.
A parancssorból
Használat parancssorból, SSH-héjból vagy hasonlóból:
$ php maintenance/run.php update
Vagrant esetén az alábbi parancsot használd (a Vagrant SSH-ból).
$ mwscript update.php
Paraméterek
A szkript több paramétert (általános, szkriptfüggő és szkript-specifikus) is kínál, amelyekre esetleg szükség lehet.
Általános karbantartó-paraméterek
--help
- kilistázza az összes (általános, szkriptfüggő és szkript-specifikus) paramétert azok rövid leírásával. Ezek a paraméterek ritkábban használtak. These are less often used parameters.
--wiki wikiId
- update wiki family if database name depends on a virtual host, where wikiId - database name (e.g., enwiki, dewiki ...)
--conf
- Megadható vele a konfigurációs állomány helye (az adott wiki
LocalSettings.php
fájlja). Wikicsaládoknál használatos.
Szkript-specifikus paraméterek
--quick
- azonnal, visszaszámlálás nélkül lefut
--initial
- (bevezetve: 1.43) Do initial updates required after manual installation using tables-generated.sql
--doshared
- A megosztott adatbázistáblákat is frissíti.
--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.
- Allows "update.php" to be run when $wgAllowSchemaUpdates is set to false. This is useful for non-WMF environments where strict DB permissions allow database updates (which "update.php" performs), but no schema changes (such as adding or dropping tables or indexes, which "update.php" also performs).
--force
- Akkor is lefuttatja a szkriptet, ha az egyébként le van tiltva.
--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"). You can use this parameter to ignore the message and run update.php regardless.
--skip-config-validation
- (bevezetve: 1.39) Skips checking whether the existing configuration is valid. Otherwise, this script will not run if an invalid configuration is detected.
--skip-compat-checks
- (eltávolítva: 1.41) Nem ellenőrzi a kompatibilitást. (Gerrit change 851684)
--nopurge
- (eltávolítva: 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.
A kiterjesztések a LoadExtensionSchemaUpdates használatával saját szerkezetet hozhatnak létre.
Lásd még
- Kézikönyv:$wgDBadminuser és Kézikönyv:$wgDBadminpassword
- Az $update részletes használatához olvasd el a $updating és $cmd lapokat
- For detailed instruction on using
update.php
, see Kézikönyv:Frissítés , Manual:Upgrading#Command_line