Manual:Running MediaWiki on macOS

Get requirements
Instead of setting the required software up separately you might be better off to start with MAMPstack + MediaWiki, which gives you Apache, MySQL, PHP & MediaWiki in one convenient package.

Or use XAMPP Application to get easier Installation and highly recommended for beginners, go here instead.

TeX support
See Manual talk:Running MediaWiki on Mac OS X for explicit instructions on how to add TeX support for macOS.

Prerequisites

 * Homebrew installed
 * Gerrit account set up
 * If MediaWiki was previously set up with Docker:
 * Create a new directory to clone MediaWiki into (allowing for parallel setups so that each can have its own )
 * Stop the container (both this and Docker setups run on 8080 port so there could only be one running at any given time)

Steps

 * 1) Create empty   directory, download MediaWiki from Git into   folder inside mediawiki folder
 * 2) Install Composer
 * 3) Update MediaWiki dependencies   from within the folder w.
 * 4) Set up PHP, Apache, MariaDB, Redis, ElasticSearch (Docker) locally and update Apache config per https://www.kostaharlan.net/posts/mediawiki-homebrew-php/
 * 5) Start services
 * 6) Make sure all services are running (by running   and   for ElasticSearch) & navigate to
 * 7) Go through MediaWiki installation steps (installation link is at the bottom of the page), at the end of the process, save   to the project directory
 * 8) After these steps, there should be a barebone MediaWiki installation (no skins/styling/data) at.

ElasticSearch
ElasticSearch is also installable via homebrew, but it won't have the  or   plugins. Running ElasticSearch as a Docker container is a good option: If you are on an Apple M1 system, you will want to use the  image that is built for arm64. See more setup instruction in MediaWiki-Docker/Configuration recipes/ElasticSearch (although you can ignore the Docker-Compose snippet there)

Setting up XDebug with PhpStorm

 * 1) Install Xdebug via , with
 * 2) Add   and   to   (check the config file path by running  )
 * 3) Verify Xdebug shows up when running
 * 4) Restart Apache & PHP
 * 5) In PhpStorm: Preferences > Languages & Frameworks > PHP > CLI interpreter > PHP executable > Select Homebrew PHP path (for example  ), make sure debug port includes
 * 6) Install Xdebug browser extension
 * 7) In PhpStorm: Listen for PHP Debug Connections (phone icon on top right)
 * 8) Verify setup in PhpStorm: PhpStorm > Run > Web Server Debug Validation > Enter   for “Url to validation script”