Can I suggest that the documentation also says that the script populates the database? The page currently does not and made me skip using it until someone told me it does. I'll be happy to do it (including a missing period that confused me) if the page protection can be removed for me (not really sure how protection works...).
Manual talk:Install.php
Thanks for the heads-up and the offer to help! Sorry that editing this page isn't possible for you right now. It was protected recently so that only autoconfirmed users could edit it, due to excessive vandalism, but the protection was meant to last only six months, and actually would expire in just a couple weeks or so from now. I'll go ahead and end the protection period early, so that you can make your edits. We can always re-protect it if vandalism resumes. Cheers! Waldyrious (talk) 08:36, 16 May 2024 (UTC)
It would be great to have a parameter to ignore existing LocalSettings.php.
In my case, a wiki_farm, I run many wikis on the same MW codebase, and I have a script to create new wiki instances. While trying to retrofit my script to use install.php, I found that there's no way to make it ignore the existing LocalSettings.php file, which is effectively a dispatcher to instance-specific configuration files.
I expected that specifying --conf to a location where no LocalSettings.php file existed, would do the trick, but it seems that this option is ignored.
That should be reported on Phabricator. Interestingly, it seems nobody has requested this feature yet (although I'd find it very useful)
I have been wanting this for years, just not believing that requesting it would make any difference, unless Wikimedia wikis needed it.
There's, however, this related ticket: T288388
I'm with أحمد on this one, fwiw.
Anyone cares to provide at least an example on how to use the script? mw-config is useless for me ATM so I'm stumped, and the usage of this script is far from trivial.
Not that I expect anyone to reply but..
For those willing to expand the article, this is the output using --help:
CLI-based MediaWiki installation and configuration. Default options are indicated in parentheses. Usage: php install.php [--conf|--confpath|--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|--wiki] [name] <admin> Generic maintenance parameters: --help (-h): Display this help message --quiet (-q): Whether to supress non-error output --conf: Location of LocalSettings.php, if not default --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. http://en.wikipedia.org. This is sometimes necessary because server name detection may fail in command line scripts. --profiler: Profiler output format (usually "text") Script dependant parameters: --dbuser: The DB user to use for this script --dbpass: The password to use for this script Script specific parameters: --confpath: Path to write LocalSettings.php to (/vagrant/mediawiki) --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) Arguments: [name]: The name of the wiki (MediaWiki) <admin>: The username of the wiki administrator.
See also: T153800.
I've added an example.
By now I don't need this anymore but thank you all the same.
There are no older topics