Jump to content
 







Main menu
   


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
 




In other languages  




Add links
 







Search  









English
 


















Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



Beginning
 


1 Install prerequisites  



1.1  Linux  





1.2  Mac  





1.3  Windows  







2 Clone MediaWiki  





3 Install dependencies  





4 Install MediaWiki  





5 Start server  





6 Next steps  














Local development quickstart










Page
Discussion
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Cite this page
Get shortened URL
Download QR code
 




Print/export  



Create a book
Download as PDF
Printable version
 
















From mediawiki.org
 


  • English
  • Hausa
  • Nederlands
  • español
  • français
  • 中文
  • 日本語
  • 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 .

    Install prerequisites[edit]

    MediaWiki requires PHP 7.4.3+ and Composer 2.

    Linux[edit]

    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[edit]

    Install the required packages using Homebrew.

    brew install php composer
    

    Windows[edit]

    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. To find the location of php.ini, run php -i, and look for Loaded Configuration File.

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

    Clone MediaWiki[edit]

    Use Git to clone the MediaWiki core repository and the default skin.

    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, create a Wikimedia developer account if you don't already have one.

    Install dependencies[edit]

    From within MediaWiki's root directory, use Composer to install MediaWiki's dependencies.

    composer update
    

    Install MediaWiki[edit]

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

    composer mw-install:sqlite
    

    Start server[edit]

    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[edit]


    Retrieved from "https://www.mediawiki.org/w/index.php?title=Local_development_quickstart&oldid=6600468"

    Category: 
    Development environments
     



    This page was last edited on 24 June 2024, at 22:23.

    Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. See Terms of Use for details.



    Privacy policy

    About mediawiki.org

    Disclaimers

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Mobile view



    Wikimedia Foundation
    Powered by MediaWiki