Translations:Manual:$wgServer/31/en

The installer sets this variable in $localsettings. However, if it is not set in LocalSettings.php, the server name will be detected at run time using the method $detect.