Manual:Code

This page describes top-level directories in the MediaWiki core code repository.

See also the following pages in the versioned MediaWiki documentation site (1>Special:MyLanguage/Manual:mwdocgen.php|auto-generated using ):

Entry points
See [https://doc.wikimedia.org/mediawiki-core/master/php/group__entrypoint.html Entry points] on doc.wikimedia.org to learn about the entry point files, such as: index.php, api.php and load.php.

The installer recommends users to enable the  feature by making this directory writable and using it for that feature.

This directory is empty by default.

Contains high-level documentation about MediaWiki, which is automatically published for each MediaWiki release (and for "master") to doc.wikimedia.org</>.

For the living version of the MediaWiki doc site, see <tvar|1>https://doc.wikimedia.org/mediawiki-core/</>.

This is where 1>Special:MyLanguage/Manual:Extensions</>|MediaWiki extensions are installed. To install an extension, its source code is placed in a subdirectory here (typically by unpacking a tarball downloaded from the extensions' mediawiki.org documentation page, or by cloning the source code from Gerrit). Then, to enable the extension it must be loaded from <tvar|1></>, typically by calling <tvar|2> </>.

The default distribution for MediaWiki (as advertised on our homepage and as packaged with Debian) also bundles a number of extensions and skins. See <tvar|1></>.

This directory stores the majority of the MediaWiki source code.

To learn about the different classes and components of MediaWiki, see [<tvar|url>https://doc.wikimedia.org/mediawiki-core/master/php/modules.html</> "Modules" on doc.wikimedia.org/mediawiki-core/].

This is the default directory where user-uploaded media files will be stored. It is also where the generated thumbnails are stored by default.

See also <tvar|1></> and <tvar|2></>.

See also 1>phab:T225756</>|T225756: Clean up "languages" directory. This directory contains files used for 1>Special:MyLanguage/Localisation</>|localization and internationalization.

Specifically:


 * the <tvar|1> </> subdirectory contains the interface messages used in MediaWiki core (using the [<tvar|url>https://github.com/wikimedia/jquery.i18n#message-file-format</> Banana JSON file format]).


 * the <tvar|1> </> subdirectory contains PHP classes that define the hundreds of languages MediaWiki supports and any unique processing rules for them.

Such as the names of <tvar|1></>, <tvar|2></> and <tvar|3></>.
 * the <tvar|1> </> subdirectory contains misc characteristics of MediaWiki that are localisable (but not interface messages).

This directory contains shell scripts for use by system administrators to perform maintenance tasks. This includes scripts for performing database schema migrations, and batch operations. See <tvar|1></> for an overview.

This directory is the entry point for the 1>Special:MyLanguage/Manual:Config script</>|Web installer which new administrators can use to install their wiki. It helps with configuring the wiki and creating the database schema.

This directory contains frontend resources (JavaScript and CSS) managed by <tvar|1></>.

This is where 1>Special:MyLanguage/Manual:Skins</>|MediaWiki skins are installed. To install a skin, its source code is placed in a subdirectory here (typically by unpacking a tarball, or by cloning the source code from Git). Then, to enable the skin it must be loaded from <tvar|1></>, typically by calling <tvar|2> </>.

See also <tvar|1></>.

Contains unit tests, integration tests, and end-to-end tests.


 * (QUnit)
 * (QUnit)