Manual:Config script

Once you have uploaded/installed MediaWiki on your web server, the first thing you need to do is complete the basic setup by running the supplied configuration script. This script allows you to tell MediaWiki the information it needs in order to get the wiki up and running.

Opening the MediaWiki installation form
In the following examples, it is assumed that your website is located at which is physically located on your server at. You will need to adjust the examples to use the appropriate locations for your situation.


 * 1) Use your web browser to browse to the main wiki page.  This is  inside the web-accessible folder that you installed MediaWiki into, and is typically  (e.g. , assuming you installed MediaWiki to  ).  (You should not have used  if you want to use it as a Short URL).


 * 1) You will see the version of MediaWiki installed and a link to "Please set up the wiki first."  Click on the link to begin the configuration script.  For reference (in case you want to go there directly), this is located in the wiki's  directory (so using the example above you would go to  ).


 * 1) If the script spots any configuration errors then it will not allow you to continue.  See below for details about the error messages you might encounter, and what to do if you do.


 * 1) If all the tests pass, you will be presented with a form to fill in the information that MediaWiki now requires.

Using the config script
Follow the instructions on the form to fill in the required entries (refer to the following table if you're uncertain what to enter) and after that click on the "Install MediaWiki!" button. The script will now populate the database and write a configuration file.

After the setup script has finished running successfully, a file called is created in the mw-config (config for older versions) directory. This file contains all the information needed by MediaWiki to run. Since it stores the specified database user's password in plain text, it is strongly suggested that you create a wiki specific database account (i.e. not root). (see Database username in the table below)


 * 1) Move this file to the main wiki directory (if you installed MediaWiki to  , move it there).


 * 1) Set stringent permissions on the   file.


 * 1) * Set chmod 600 and chown (Owner read and write, no other permissions).

Once you have done the above, your wiki should be ready to use. Browse to the address you installed it to (in our example http://www.example.com/w/index.php ) and start editing!

Installation errors
When you run the config script it makes various checks of your system, and tells you if there are any problems.

Configuration errors
Warning: $wgSecretKey key is insecure, generated with mt_rand. Consider changing it manually.
 * What about the $wgSecretKey e.g.

Answer: It means your system doesn't support /dev/urandom so the key was generated with mt_rand. You can manually edit the wgProxyKey field in LocalSettings.php.

Advanced configuration

 * - to enable image/files upload.


 * Also see for having more user friendly URL to article pages.


 * See for links to more advanced configuration.


 * See to setup multiple instances of MediaWiki with single set of MediaWiki files.