Local development quickstart/ha

This page is a translated version of the page Local development quickstart and the translation is 88% complete.

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 Manual:Installation requirements .

Shigar da abubuwan da ake bukata

MediaWiki yana buƙatar PHP 7.4.3+ da Mawaƙa 2.

Linux

A kan Ubuntu 22+ ko Debian 11+, shigar da fakitin da ake buƙata ta amfani da APT.

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

A kan Ubuntu 20, shigar da PHP daga APT, amma shigar da Mawaƙi daga getcomposer.org/download.

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

A kan Fedora 35+, shigar da fakitin da ake buƙata ta amfani da DNF.

sudo dnf install -y php composer

A kan Arch Linux, shigar da fakitin da ake buƙata ta amfani da pacman.

sudo pacman -S php composer --noconfirm

Mac

Shigar da fakitin da ake buƙata ta amfani da Homebrew.

brew install php composer

Windows

Kuna da zaɓi don amfani da Windows Subsystem don Linux kuma ku bi umarnin Linux akan wannan shafin. Ko, don shigar MediaWiki kai tsaye akan Windows, shigar da fakitin da ake buƙata ta amfani da Chocolatey.

choco install -y php composer

Don loda kari na PHP da ake buƙata, shirya fayil ɗin php.ini, kuma ba da amsa ga layukan masu zuwa. Don nemo wurin php.ini, gudu php --ini, kuma nemi Fayil Kanfigareshan Loaded.

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


Clone MediaWiki

Yi amfani da Git don rufe ainihin ma'ajiyar MediaWiki da tsohuwar fata.

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 yana ɗaukar mintuna kaɗan. Yayin da kuke jira, ƙirƙiri asusun haɓaka Wikimedia idan baku da ɗaya.

Shigar da abin dogaro

Daga cikin tushen tushen MediaWiki, yi amfani da Mawaƙi don shigar da abin dogaro na MediaWiki.

composer update

Shigar MediaWiki

Sanya MediaWiki tare da ginanniyar bayanan SQLite na PHP.

composer mw-install:sqlite

Fara uwar garken

Fara ginanniyar sabar gidan yanar gizo na PHP, kuma buɗe localhost:4000 a cikin mazugi don ganin misalin MediaWiki na ku. Don shiga azaman mai gudanarwa , yi amfani da sunan mai amfani Admin da kalmar sirri adminpassword.

composer serve

Matakai na gaba