Kézikönyv:Update.php

This page is a translated version of the page Manual:Update.php and the translation is 51% complete.
Outdated translations are marked like this.

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 böngészőből

Ha a szerveren nincs parancssori hozzáférésed, a webes frissítőt is használhatod.

Webes frissítő

A parancssorból

Használat parancssorból, SSH-héjból vagy hasonlóból:

  • Lépj be a maintenance könyvtárba
  • Futtasd a frissítőszkriptet:
  • Run the update script:
$ php update.php
  Figyelem: Az update.php esetleg hibaüzenettel lép ki, ekkor pedig az adatbázis használhatatlan lesz. Futtatás előtt mindig készíts biztonsági másolatot! Always backup the database before running the script!
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.
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 virtual host, where wikiId - database name (e.g. enwiki, dewiki ...)

Szkript-specifikus paraméterek
--quick
azonnal, visszaszámlálás nélkül lefut
--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.
--doshared
A megosztott adatbázistáblákat is frissíti.
--force
Akkor is lefuttatja a szkriptet, ha az egyébként le van tiltva.
--conf
Megadható vele a konfigurációs állomány helye (LocalSettings.php). Wikicsaládoknál használatos.
--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).
--skip-compat-checks
Nem ellenőrzi a kompatibilitást. (eltávolítva: 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"). You can use this parameter to ignore the message and run update.php regardless.
  Figyelem: Használata csak fejlesztők számára ajánlott.

A kiterjesztések a LoadExtensionSchemaUpdates használatával saját szerkezetet hozhatnak létre.

Lásd még