Cli/guide/Docker-Development-Environment/First-Setup

mwcli contains a MediaWiki-Docker-Dev like developer environment.

If you haven't used this development environment before, then this is the guide for you!

If you already have a LocalSettings.php file from a previous developer environment, see the LocalSettings.php section below before starting.

MediaWiki services
Let's begin with a basic MediaWiki installation and then create the necessary services.

You will be guided through a setup wizard that covers:


 * The port the development environment should run on.
 * The location to store the MediaWiki code (new or existing directory).
 * Cloning the MediaWiki code (if missing).
 * Cloning the Vector skin (if missing).
 * Options for cloning the code (Github or Gerrit; shallow or regular; over ssh or http).

After you make these choices, the setup wizard will clone the necessary code.

Here's a replay of the wizard:

Once the install is complete, you should be able to see a few running services by executing this command:

You should see output that looks something like this:

Database
mwcli can use a variety of databases, but for the purposes of this setup guide, we will focus on MySQL.

You can start a MySQL service for MediaWiki by executing the following command:

As before, using, you should see some new services running:

You'll see that the mysql-replica service has exited, which is just as expected.

MediaWiki installation
The development environment automatically sets various MediaWiki settings, such as database details. In order to do this, it needs a "shim" at the top of your LocalSettings.php file.

When starting with a fresh install this will be created by the setup wizard as part of the installation step.

If you have an existing LocalSettings.php please read this guide (LINK TODO)

Install MediaWiki with a mysql backend using the following command:

This will:


 * As you about creating a LocalSetting.php file if needed
 * Run a composer install if needed
 * Run the MediaWiki install.php to create database tables
 * Run the MediaWiki update.php to perform any other needed updates

After completion, you should see some output that will guide you to the wiki.

You can then navigate to your site