The recommended method is by changing the value of the $wgGroupPermissions configuration option.
$wgGroupPermissions
Edit LocalSettings.php and add the line:
LocalSettings.php
$wgGroupPermissions['*']['edit'] = false;