Manual:addSite.php

From Linux Web Expert

<translate> See also</translate>: Managing the sites table

Details

addSite.php is a maintenance script that adds a site definition to the sites database table.

Options/Arguments

Option Description Required Default value
globalid Global id of the site to add <translate> Required</translate>
group Which group this site should be sorted in <translate> Required</translate>
--language Language code of the site, for example: "hi" <translate> Optional</translate>
--interwiki-id Interwiki ID of the site <translate> Optional</translate>
--navigation-id Navigation ID of the site <translate> Optional</translate>
--pagepath URL to pages of this site, for example: https://example.com/wiki/$1 <translate> Optional</translate>
--filepath URL to files of this site, for example: https://example.com/w/$1 <translate> Optional</translate>

Usage

php maintenance/addSite.php globalid group [ --language| --interwiki-id| --navigation-id| --pagepath| --filepath ]

Adding site with basic config

Terminal

Adding site with language

Terminal

Adding site with filepath and pagepath

Terminal
Tip: The sites table is cached in the local-server cache, so you should reload your webserver and other long-running MediaWiki PHP processes after running this script.

See also