MediaWiki

MediaWiki is an open-source publishing platform that can be used for creating a collaborative document repository. It’s the software that drives the Wikipedia website. Setting up MediaWiki on your own domain can be done by following these steps:
- To get started you’ll need to login to your control panel through the application portal. Use your network login id and password.

- Once logged in you’ll be at the homepage of your control panel. Navigate the Applications section of the cPanel and click on the All Applications icon.

- Then find and select MediaWiki icon and click it.

- Next, you'll see the information page for MediaWiki. Click on the Install this Application button in the upper-right.

- On the next page the installer will ask for some information about this installation. The first thing you’ll want to do is decide where to install your MediaWiki. If you’re wanting to install MediaWiki at the root of your domain, leave the directory area empty. If you created a subdomain especially for your wiki, select it from the dropdown menu. There is an option for installing MediaWiki in a subfolder by typing in the folder name in the Directory field. In this instance, we have opted to install it in a subdomain called wiki.help.bergbuilds.domains. More information about subdomains and subfolders can be found in the Domain Management section of this guide. By default the installer will automatically backup your MediaWiki website and update it anytime a new version comes out. It is recommended to keep this option. The installer will also create a database automatically.

- Finally, create an initial username and password for MediaWiki administrative access. Enter that information in the section of the installation form called, "Settings" and click Install
(Note: A default username and password are provided for you, but it's better to pick an administrative username and password you are likely to remember.)
The installer will take just a few moments to install MediaWiki. The progress bar will keep you updated. When it is complete you will see a link to your new MediaWiki site as well as a link to the administration area for your MediaWiki site.

Congratulations, you have now completed the installation of MediaWiki! You can now start to create collaborative documents on your own domain.

Managing MediaWiki Permissions
The default, Mediawiki has been customized to make it harder for spammers to overwhelm wikis with illegitimate content and comments. This is done by modifying the LocalSettings.php file (a file that is included in every installation that allows for local site configuration).
By default, Mediawiki allows anonymous users to create pages and edit pages in the wiki. The modifications provided below change a MediaWiki in the following ways:
- Anonymous users cannot edit existing pages
- Anonymous users cannot create pages
- Registered users must click the confirmation link in the registration email in order to edit or create pages
This approach should drastically reduce unsolicited content and comments on Mediawiki installations. One further step that an administrator might take is to turn registration off after a predetermined amount of time. Users must create accounts by this date; after that, the settings are changed so that registrations are no longer open.
To add this setting, you must edit LocalSettings.php in your Mediawiki. Follow these simple steps:
-
Login to cPanel and browse to your File Manager.
-
In the File Manager, browse to the folder within public_html that contains the Mediawiki installation. If you installed the wiki at the root of your domain, you won’t need to go any further than the public_html directory. If you installed the wiki in a subdomain or subdirectory, you’ll need to find the directory that is associated with it.
- Locate LocalSettings.php. Right+click or Control+click the file, and select "Copy". Make a duplicate of the LocalSettings.php file and call it "LocalSettings.php.backup". This is important to do any time you are making changes to configuration files. Should something go wrong, simply delete your mistakes and start over by removing the 'bad' file and renaming the original by dropping the '.backup' extension.

- Once that is completed, highlight the LocalSettings.php file and click the Code Editor icon at the top of the File Manager menu.

- Browse to the bottom of the document, and locate the custom settings that were added during the Mediawiki installation and the line ##End of automatically generated settings. (it should be around line 137). Go to the bottom of the stanza (around line 143), and copy and paste the code below:
$wgGroupPermissions[‘*’][‘createaccount’] = false;
When all done, your Code Editor screen should look like this:

Be sure to click the Save Changes button in the upper right-hand corner of the Code Editor screen.
Now congratulate yourself! You just installed MediaWiki and customized some code! Well done!