MediaWiki Logo

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:

  1. To get started you’ll need to login to your control panel through the application portal. Use your network login id and password.

Muhlenberg's One Login Application Portal

  1. 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.

All Apps icon in cpanel

  1. Then find and select MediaWiki icon and click it.

MediaWiki icon within the apps for community building section

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

Install button on the Installatron for MediaWiki

  1. 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 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.

installing into the wiki subdomain

  1. 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

selecting administrative username and password for MediaWiki installation (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.

links to public and admin areas of new MediaWiki

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

public landing page of new MediaWiki

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:

  1. Login to cPanel and browse to your File Manager.

  2. 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.

  3. 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.

Backing up the LocalSettings.php file before editing it

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

LocalSettings.php file open in the Code Editor of File Manager

  1. 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:

edited LocalSettings.php file for MediaWiki

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!