Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Get MediaWiki
Get extensions
Tech blog
Contribute
Support
User help
FAQ
Technical manual
Support desk
Communication
Development
Developer portal
Code statistics
mediawiki.org
Community portal
Recent changes
Translate content
Random page
Village pump
Sandbox
Search
English
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Export translations
Translate
English
Language statistics
Message group statistics
Export
Tools
Tools
move to sidebar
hide
Actions
Language statistics
Message group statistics
Export
General
Upload file
Special pages
Printable version
Get shortened URL
Download QR code
<languages /> {{MW file|update.php|maintenance/|class1=UpdateMediaWiki}} <span id="Details"></span> ==Einzelheiten== <span class="mw-translate-fuzzy">'''update.php''' prüft, ob das [[Special:MyLanguage/Manual:Database layout|MediaWiki-Datenbankschema]] aktualisiert werden muss, um mit der aktuellen Version von MediaWiki zu arbeiten.</span> Das <code>update.php</code>-Skript sollte nach jeder [[Special:MyLanguage/Manual:Upgrading|Aktualisierung]] der MediaWiki-Software oder dem Installieren einer Erweiterung, die ein Schema-Update erfordert, ausgeführt werden. Die meisten Erweiterungen, die ein Schema-Update erfordern, werden dies in ihrer Dokumentation angeben. <span id="From_the_browser"></span> === Zugriff über den Browser === <div lang="en" dir="ltr" class="mw-content-ltr"> If you do not have access to the command line of your server, then use the [[Special:MyLanguage/Manual:Upgrading#Web_updater|web updater]] to run the update script. </div> : '''→ <span lang="en" dir="ltr" class="mw-content-ltr">[[Special:MyLanguage/Manual:Upgrading#Web_updater|Web updater]]</span>''' <span id="From_the_command_line"></span> === Zugriff über die Kommandozeile === Von der Befehlszeile oder einer SSH-Shell oder ähnlichem: <div lang="en" dir="ltr" class="mw-content-ltr"> * Run the update script: </div> $ php maintenance/run.php update {{Warning|1=<span class="mw-translate-fuzzy"><code>update.php</code> kann mit Fehlern abbrechen und die Datenbank in einem inkonsistenten Zustand zurücklassen. Legen Sie daher unbedingt immer ein [[$backup|Backup]] der Datenbank an, bevor Sie das Skript laufen lassen!</span> <span lang="en" dir="ltr" class="mw-content-ltr">Always [[Special:MyLanguage/Manual:Backing up a wiki|backup]] the database before running the script!</span>}} {{note|1=<span lang="en" dir="ltr" class="mw-content-ltr">This maintenance script can be disabled via {{ll|Manual:$wgAllowSchemaUpdates|$wgAllowSchemaUpdates}}.</span> <span lang="en" dir="ltr" class="mw-content-ltr">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.</span>}} {{note|1=<span lang="en" dir="ltr" class="mw-content-ltr">Use the following on {{ll|MediaWiki-Vagrant|Vagrant}} instances (from within your vagrant ssh).</span>}} <pre style="overflow:auto;"> $ mwscript update.php </pre> <span id="Parameters"></span> ==== Parameter ==== <div lang="en" dir="ltr" class="mw-content-ltr"> This script offers several parameters (generic, script dependent and script specific) which may be required in some wiki environments. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ===== Generic maintenance parameters ===== </div> ; <code>--help</code> : <span lang="en" dir="ltr" class="mw-content-ltr">used to get a prompt of all available script parameters (generic, script dependent and script specific) together with short explanations of their usage.</span> <span lang="en" dir="ltr" class="mw-content-ltr">These are less often used parameters.</span> ; <code>--wiki ''wikiId''</code> : <span lang="en" dir="ltr" class="mw-content-ltr">update wiki family if database name depends on virtual host, where wikiId - database name (e.g. enwiki, dewiki ...)</span> <div lang="en" dir="ltr" class="mw-content-ltr"> ===== Script specific parameters ===== </div> ; <code>--quick</code> : <span lang="en" dir="ltr" class="mw-content-ltr">skip countdown sequence</span> ; <code>--nopurge</code> : {{removed-inline|1.36}} <span lang="en" dir="ltr" class="mw-content-ltr">do not purge objectcache table.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Normally <code>update.php</code> purges the {{ll|Manual:objectcache table|objectcache}} table (generally contains the parser cache and the messages cache), {{ll|Manual:Msg resource table|msg_resource}} and {{ll|Manual:Msg resource links table|msg_resource_links}} (these are used for {{ll|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 <code>--nopurge</code> option.</span> ; <code>--doshared</code> : <span lang="en" dir="ltr" class="mw-content-ltr">Update [[Special:MyLanguage/Manual:Shared database|shared tables]] as well.</span> ; <code>--force</code> : <span lang="en" dir="ltr" class="mw-content-ltr">Run this script even if it is disabled by configuration options.</span> ; <code>--conf</code> : <span lang="en" dir="ltr" class="mw-content-ltr">Specifies the config file (the LocalSettings.php file for the specific wiki).</span> Verwendung für [[Special:MyLanguage/Manual:Wiki family#Using conf parameter|Wiki-Familien]]. ; <code>--noschema</code> : <span lang="en" dir="ltr" class="mw-content-ltr">All changes to the table structure or table additions are skipped. Only data changes are made.</span> ; <code>--schema</code> : <span lang="en" dir="ltr" class="mw-content-ltr">No schema changes are made to the database, but the schema changes are saved to a separate SQL file that can be run.</span> {{Note|1=<span lang="en" dir="ltr" class="mw-content-ltr">Allows "update.php" to be run when {{ll|Manual:$wgAllowSchemaUpdates|$wgAllowSchemaUpdates}} is set to false.</span> <span lang="en" dir="ltr" class="mw-content-ltr">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).</span>}} ; <code>--skip-compat-checks</code> : <span lang="en" dir="ltr" class="mw-content-ltr">Skips compatibility checks</span> {{removed-inline|1.41}}, {{gerrit|851684}} ; <code>--skip-external-dependencies</code> : <span lang="en" dir="ltr" class="mw-content-ltr">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").</span> <span lang="en" dir="ltr" class="mw-content-ltr">You can use this parameter to ignore the message and run update.php regardless.</span> {{Warning|1=<span lang="en" dir="ltr" class="mw-content-ltr">Only recommended for use by developers.</span>}} <div lang="en" dir="ltr" class="mw-content-ltr"> Extensions can install/update their schemas using {{ll|Manual:Hooks/LoadExtensionSchemaUpdates|LoadExtensionSchemaUpdates}} hook. </div> <span id="See_also"></span> == Siehe auch == <div lang="en" dir="ltr" class="mw-content-ltr"> * {{ll|Manual:$wgDBadminuser}} and {{ll|Manual:$wgDBadminpassword}} </div> <div lang="en" dir="ltr" class="mw-content-ltr"> * For detailed instruction on using <code>update.php</code>, see {{ll|Manual:Upgrading}}, [[Special:MyLanguage/Manual:Upgrading#Command_line|Manual:Upgrading#Command_line]] </div> [[Category:Maintenance scripts{{#translation:}}|Update.php]]
Toggle limited content width