Local development quickstart/uk

This page is a quickstart guide to setting up a local development for MediaWiki using PHP and Composer.

This workflow is only suitable for local development. To serve a public website, see Посібник:Вимоги до встановлення .

Install prerequisites

MediaWiki requires PHP 7.4.3+ and Composer 2.

Category:Gadget:TabbedWindow

Linux

On Ubuntu 22+ or Debian 11+, install the required packages using APT.

sudo apt install -y php php-intl php-mbstring php-xml php-apcu php-curl php-sqlite3 composer

On Ubuntu 20, install PHP from APT, but install Composer from getcomposer.org/download.

sudo apt install -y php php-intl php-mbstring php-xml php-apcu php-curl php-sqlite3

On Fedora 35+, install the required packages using DNF.

sudo dnf install -y php composer

On Arch Linux, install the required packages using pacman.

sudo pacman -S php composer --noconfirm

Mac

Install the required packages using Homebrew.

brew install php@8.2 composer
brew link php@8.2

Windows

You have the option to use the Windows Subsystem for Linux and follow the Linux instructions on this page. Or, to install MediaWiki directly on Windows, install the required packages using Chocolatey.

choco install -y php composer

To load the required PHP extensions, edit your php.ini file, and uncomment the following lines. Щоб знайти місце розташування php.ini, запустити php --ini, і шукати завантажений файл конфігурації.

extension:fileinfo
extension:intl
extension:pdo_sqlite
extension:zip

Clone MediaWiki

Використовуйте Git для клонування основного сховища MediaWiki і замовчування шкіри.

git clone https://gerrit.wikimedia.org/r/mediawiki/core.git mediawiki 
git clone https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git mediawiki/skins/Vector
cd mediawiki

Cloning MediaWiki takes a few minutes. While you're waiting, if you plan to create and share patches, create a Wikimedia developer account if you don't already have one.

Install dependencies

From within your mediawiki directory, created above, use Composer to install MediaWiki's dependencies.

composer update

Install MediaWiki

Install MediaWiki with PHP's built-in SQLite database.

composer mw-install:sqlite

Start server

Start PHP's built-in webserver, and open localhost:4000 in a browser to see your MediaWiki instance. To log in as an administrator, use username Admin and password adminpassword.

composer serve

Next steps

Category:Development environments/uk
Category:Development environments/uk Category:Gadget:TabbedWindow