Manual:Installation requirements

From Linux Web Expert


In addition to the MediaWiki software itself, you need:

In addition, there are various optional dependencies which are required if you want to use certain advanced features (see below).

If your website is hosted (i.e. you don't have direct control over it) then contact your server administrator or hosting company to ensure these software packages are installed and available.

To run MediaWiki maintenance scripts, you will need command line access.

One-download installation

If you are using Linux, it's best to install the Apache web server, PHP, and the MariaDB database server using your package manager. On Debian and Ubuntu, do the following:

sudo apt-get install apache2 mariadb-server php php-intl php-mbstring php-xml php-apcu php-curl php-mysql
Software bundles

On other operating systems, use a software bundle like XAMPP from https://www.apachefriends.org to install and configure all of the important packages – Apache web server, PHP, and MariaDB – with only one download. It is available for Linux, Windows, Mac and Solaris. As of January 2021, the latest version of XAMPP includes PHP 8.0 (MediaWiki requires at least 7.4.3).

Alternatively, if you run Mac OS, you can use MAMP, which is the equivalent to XAMPP. MAMP includes the ability to run the Apache web server and a MySQL database. It is available for both Windows and Mac, but is generally used on Mac instead of Windows.

Web server

In order to serve wiki pages to browsers, MediaWiki requires some web server software. Often you will not have a choice of which software to use – it will be the one provided by your hosting provider.

MediaWiki is broadly compatible with all major web servers that can invoke a compatible version of PHP. Most installations use the Apache HTTPD web server. Nginx (configuration example) is a good choice as well.

PHP

PHP is the programming language in which MediaWiki is written, and is required in order to run the software.

  • For the latest stable version of MediaWiki, at least PHP 7.4.3 is required. See the page on Compatibility for further information.
<translate> MediaWiki is not compatible with PHP <tvar name=1>7.4.0 - 7.4.2</tvar> due to an upstream bug.</translate> <translate> Use PHP <tvar name=1>7.4.3+</tvar> instead.</translate> <translate> See <tvar name=1><translate> task <tvar name=1>T246594</tvar></translate></tvar> for more information.</translate>
<translate> If using PHP 8, it is recommended to use MediaWiki <tvar name=1>1.38.4</tvar> or higher.</translate> <translate> PHP 8 is not in use by Wikimedia wikis, and thus gets less testing, but other groups do use MediaWiki with PHP 8 without issue.</translate> <translate> If you encounter any bugs when using MediaWiki with PHP 8, please [<tvar name=url>https://phabricator.wikimedia.org/maniphest/task/edit/form/43/?tags=PHID-PROJ-5l34pylp4v3p3jcrazty</tvar> report them].</translate> <translate> See <tvar name=1><translate> task <tvar name=1>T248925</tvar></translate></tvar> for more information.</translate>
  • The following extensions are required:
  • The following extensions are recommended in addition to the required ones:
  • MediaWiki only requires PHP extensions that are enabled in PHP by default. If your hosting provider provides a basic LAMP environment without these, you may need to install or enable these manually.
    • In Debian/Ubuntu, the following command installs all recommended PHP extensions listed above:
      sudo apt-get install php php-intl php-mbstring php-xml php-apcu php-curl
  • At hosting providers with a control panel such as cPanel, you can often use "Select PHP Version" (PHP Selector) to enable these extensions. (For example, after seeing "You are missing a required extension to PHP that MediaWiki requires to run. Please install: intl")
  • On most Debian/Ubuntu-based distros the php-mysql package is required if you want MediaWiki to use MySQL.
  • Some features of MediaWiki may require PHP functions that execute external processes, like image thumbnailing, that some cheap hosts usually disable. Please take this into consideration if you plan to install MediaWiki on a shared host.
  • MediaWiki extensions may require additional PHP features, e.g. VisualEditor requires libcurl support (php-curl on Debian/Ubuntu-based distros).

If you need to compile PHP from source, then see PHP configuration for compilation options that affect MediaWiki.

Database server

MediaWiki stores all the text and data (content pages, user details, system messages, etc.) in a database, which it is capable of sharing with other web-based applications (phpBB, etc.). You will need one of the following database servers to run the latest version of MediaWiki:

Using MariaDB or MySQL is recommended as Wikimedia uses MariaDB. Any other database servers are less tested and you may likely run into some bugs.

Microsoft SQL Server </> as of version <tvar ">2>Oracle </> or <tvar

Some users find it helpful to install additional control panel software such as phpMyAdmin (MySQL/MariaDB) or phpPgAdmin (PostgreSQL) to help administer the database server. Some Hosting services also provide such software.

Hardware requirements

The recommended minimum requirements are 256MB of RAM for a single-computer website and 85MB of storage, although this will not suffice for a busy public site or a site with uploading enabled. Some users have reported running MediaWiki on computers with as little as 48MB of RAM.

Optional dependencies

See also