Making a English Wikipedia server: Difference between revisions

Saved progress so far
Preperation: Added LocalSettings.php additions
Line 117: Line 117:
* A copy of the LocalSettings.php file will be downloaded automatically. This needs to be moved to the root folder of the wiki which will then make it work.
* A copy of the LocalSettings.php file will be downloaded automatically. This needs to be moved to the root folder of the wiki which will then make it work.
* Click 'Enter your wiki'. You will be greeted with the default MediaWiki Main page if all is well.
* Click 'Enter your wiki'. You will be greeted with the default MediaWiki Main page if all is well.
=== Finish configuring LocalSettings.php ===
* Open LocalSettings.php in a text editor
* Add a line to enable a favicon:
$wgFavicon = "$wgResourceBasePath/resources/assets/<logoimage.svg>";
* Change <code>$wgEnableUserEmail</code> to <code>false</code>
* Edit <code>$wgEmergencyContact</code> and <code>$wgPasswordSender</code> with your email address between the quote marks
* Change <code>$wgLocaltimezone</code> from UTC to your correct PHP timezone - in our case, <code>Europe/London</code>
* Underneath <code>$wgGroupPermissions['*']['edit'] = false;</code>, add the following
$wgGroupPermissions['*']['createaccount'] = false;
This stops user accounts being created and prevents editing by anyone other than yourself.
* Add under <code>wfLoadSkin ( 'Vector' );</code> the following:
$wgDefaultSkin = 'vector-2022';
This enables the modern Vector 2022 skin
* Add under <code>wfLoadExtension( 'JsonConfig' );</code>:
$wgJsonConfigEnableLuaSupport = true; // required to use JsonConfig in Lua
$wgJsonConfigModels['Tabular.JsonConfig'] = 'JsonConfig\JCTabularContent';
$wgJsonConfigs['Tabular.JsonConfig'] = [
        'namespace' => 486,
        'nsName' => 'Data',
        // page name must end in ".tab", and contain at least one symbol
        'pattern' => '/.\.tab$/',
        'license' => 'CC0-1.0',
        'isLocal' => false,
];
$wgJsonConfigModels['Map.JsonConfig'] = 'JsonConfig\JCMapDataContent';
$wgJsonConfigs['Map.JsonConfig'] = [
        'namespace' => 486,
        'nsName' => 'Data',
        // page name must end in ".map", and contain at least one symbol
        'pattern' => '/.\.map$/',
        'license' => 'CC0-1.0',
        'isLocal' => false,
];
$wgJsonConfigInterwikiPrefix = "commons";
$wgJsonConfigs['Tabular.JsonConfig']['remote'] = [
        'url' => 'https://commons.wikimedia.org/w/api.php'
];
$wgJsonConfigs['Map.JsonConfig']['remote'] = [
        'url' => 'https://commons.wikimedia.org/w/api.php'
];
* Add under <code>wfLoadExtension( 'Math' );</code>:
$wgDefaultUserOptions['math'] = 'mathml';
* Add under <code>wfLoadExtension( 'MobileFrontend' );</code>:
$wgMFAutodetectMobileView = true;
$wgMFDefaultSkinClass = 'SkinMinerva';
* Add under <code>wfLoadExtension( 'Scribunto' );</code>
$wgScribuntoDefaultEngine = 'luastandalone';
$wgScribuntoEngineConf['luastandalone']['cpuLimit'] = '60'; # Allows lua scripts to run for 60 seconds - needed during import
* Add the following block at the end (leave commented out until needed for debugging for security and comment back out once debugging finished):
# Show PHP exceptions (only enable on error)
#$wgShowExceptionDetails = true;
== Importing the dump ==
== Importing the dump ==