Phabricator/Local Dev Environment

This page started life as User:BBearnes (WMF)'s notes from setting up a local dev environment for Phabricator, with some additions by MModell.

The hostname used here is: http://phabricator.lan/

An alternative pre-configured environment exists, which allows to use our existing deployment to spin up a working local Phab/Phorge instance via Scap. See here.

= Phabricator / Phorge installation =

See Phabricator installation guide or Phorge installation guide for basics.

For stability, stick to PHP 7 and avoid distributions with PHP 8.1+ for the time being.

Install system dependency packages

 * On Debian Bullseye: (or replace   with   when using Apache HTTPD)
 * On Fedora:

When using Apache, install its php module. For PHP 7:

Pull Wikimedia Phabricator code

 * If not done yet, set up your SSH key in Wikimedia GitLab to git clone in the next step

Enable Phabricator developer mode

 * Optionally, set a DB prefix to avoid conflicts when testing with several versions:
 * Optionally, set a DB prefix to avoid conflicts when testing with several versions:

Configure PHP
Per http://phabricator.lan/config/issue/extension.opcache.devmode/ shown in the installed instance, make the following changes on Debian in the file. (The command  locates the configuration file.)

Edit default Phabricator config file
Create (or edit)  with the following content:

Define system host
Add to the file  the following line:

Configure webserver
Note: This section only applies when using Apache HTTPD instead of Nginx:


 * Enable the two required modules:
 * Create the file  with the following content:

Start webserver
(or when using Apache HTTPD)

= Load custom Phabricator extensions =

For antivandalism, misc and translations:

Then config is under http://phabricator.lan/config/group/, for example http://phabricator.lan/config/group/antivandalism/

= Administration, etc. =

Creating test data
This requires developer mode, but there's a `lipsum` command:

Auth lock
Disallows configuring authentication methods in the user interface

Recover access to a local account
See https://secure.phabricator.com/book/phabricator/article/configuring_accounts_and_registration/, basically: