| MediaWiki file: install.php | |
|---|---|
| Location: | maintenance/ |
| Source code: | master • 1.40.0 • 1.39.4 • 1.35.11 |
| Classes: | CommandLineInstaller |
Details
install.php file is a CLI-based maintenance script for installing and configuring MediaWiki.
This script creates a new LocalSettings.php.
It will abort if a LocalSettings.php file exists already, and it can't read existing settings from that file.
Usage
php install.php [--conf|--confpath|--dbgroupdefault|--dbname|--dbpass|--dbpassfile|--dbpath|--dbport|--dbprefix|--dbschema|--dbserver|--dbtype|--dbuser|--env-checks|--globals|--help|--installdbpass|--installdbuser|--lang|--memory-limit|--pass|--passfile|--profiler|--quiet|--scriptpath|--server|--skins|--wiki|--with-extensions] <name> <admin>
The tables below explain the various options and arguments. The default values for the options are indicated in parentheses.
Generic maintenance parameters:
| --help (-h) | Display this help message |
| --quiet (-q) | Whether to suppress non-error output |
| --conf | Location of LocalSettings.php, if not default This setting has no effect on this script and will be ignored. |
| --wiki | For specifying the wiki ID |
| --globals | Output globals at the end of processing for debugging |
| --memory-limit | Set a specific memory limit for the script, "max" for no limit or "default" to avoid changing it |
| --server | The protocol and server name to use in URLs, e.g. https://en.wikipedia.org. This is sometimes necessary because server name detection may fail in command line scripts. |
| --profiler | Profiler output format (usually "text") |
Script-dependent parameters
| --dbuser | The DB user to use for this script. This value appears in LocalSettings.php for $wgDBuser. If --installdbuser and --installdbpass are given, this value will be used to create a new account |
| --dbpass | The password to use for this script. This value appears in LocalSettings.php for $wgDBpassword. If --installdbuser and --installdbpass are given, this value will be used to create a new account |
| --dbgroupdefault | The default database group to use |
Script-specific parameters
| --confpath | Path to write LocalSettings.php to (/var/www/) |
| --dbname | The database name (my_wiki) |
| --dbpassfile | An alternative way to provide dbpass option, as the contents of this file |
| --dbpath | The path for the SQLite DB ($IP/data) |
| --dbport | The database port; only for PostgreSQL (5432) |
| --dbprefix | Optional database table name prefix |
| --dbschema | The schema for the MediaWiki DB in PostgreSQL/Microsoft SQL Server (mediawiki) |
| --dbserver | The database host (localhost) |
| --dbtype | The type of database (mysql) |
| --env-checks | Run environment checks only, don't change anything |
| --installdbpass | The password for the DB user to install as |
| --installdbuser | The user to use for installing (root) |
| --lang | The language to use (en) |
| --pass | The password for the wiki administrator |
| --passfile | An alternative way to provide pass option, as the contents of this file |
| --scriptpath | The relative path of the wiki in the web server (/wiki) |
| --skins | Comma-separated list of skins to install (default: all) |
| --with-extensions | Detect and include extensions |
Arguments
| <name> | The name of the wiki |
| <admin> | The username of the wiki administrator |
Examples
Set up wiki using a user with required permissions in database to create a new database for the wiki and a user to operate the wiki:
php maintenance/install.php --dbname=wikidb --dbserver="localhost" --installdbuser=root --installdbpass=rootpassword --dbuser=grabber --dbpass=grabber --server="http://wiki.domain.name/" --scriptpath=/ --lang=en --pass=aaaaa "Wiki Name" "Admin"
This article is issued from Mediawiki. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.