Add following directives to LocalSettings.php.
LocalSettings.php
$wgGroupPermissions['*']['createaccount'] = false;
$wgGroupPermissions['*']['edit'] = false; $wgGroupPermissions['*']['createpage'] = false;
$wgBlockDisablesLogin=true;