Manual:Config script

Once you have installed MediaWiki, 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.

Running the script
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 the web-accessible folder that you installed MediaWiki into, and is typically   (e.g. , assuming you installed MediaWiki to  ).
 * 2) You will be presented with a message telling you that your wiki is installed, but has not yet been configured and that you need to "click here to setup the wiki". 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  ).
 * 3) 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.
 * 4) If all the tests pass, you will be presented with a form to fill in the information that MediaWiki now requires.  Follow the instructions on the form to fill in the required entries.  See below if you need help with any of the items.
 * 5) Click the "Install!" button.  The script will now populate the database and write a configuration file.  If any errors occur, go back and check your data - see below for help.

After the setup script has finished running, a file called LocalSettings.php is created in the "config" directory. This file contains all the information needed by MediaWiki to run.


 * 1) Move this file to the main wiki directory (if you installed MediaWiki to /home/example/web/wiki, move it there).
 * 2) Set stringent permissions on the LocalSettings.php file. ( chmod 600 and chown )
 * 3) Delete the "config" directory.

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/wiki/ and start editing!

Form fields
When filling in the configuration form, refer to the following table if you're uncertain what to enter.

[TODO: This section does not currently include all fields - it needs to be expanded. --HappyDog 22:21, 29 August 2007 (UTC)]

[TODO: The Database character set section is not well explained(sorry for that). If someone can allaborate it will be great - it needs to be expanded and clearafiy. -- RandallFlagg 00:42, 19 December 2007 (GMT+2)]

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


 * Attempting to connect to database server as wikiuser...failed with error [2004] Can't create TCP/IP socket (10106).
 * Often found in the internet that you should turn on named pipes in the MySQL configuration, but this did not help me (this
 * appeared under Win2000 with MySQL 5.0)


 * "Warning: main [function.main]: open_basedir restriction in effect. File(/convertLinks.inc) is not within the allowed path(s):"
 * Apparently the include path sometimes needs to be set. Put [ php_value include_path '/var/www/vhosts/yourhost.com/httpdocs/pathtowiki'  ] in you .htaccess file.


 * (MediaWiki 1.10.1) After 'Running the script' 1. The text is: 'Setup has completed, your wiki is configured.' Selecting 'your wiki' opens a new screen with the address: http://localhost:8080/mediawiki/index.php and the error 'The page cannot be displayed. I use Wiki on a stick.
 * Warning: getrusage is not supported in this PHP build
 * Text needed

[TODO: This section should list all potential error messages and how to fix them. Or perhaps they should be on a separate page (depends how many there are, I guess... --HappyDog 22:05, 29 August 2007 (UTC)]

Configuration errors
[TODO: This section should list all errors that can occur when submitting the form, and how to handle them. Or perhaps on a separate page, if necessary]

What about the $wgSecretKey e.g.

Warning: $wgSecretKey key is insecure, generated with mt_rand. Consider changing it manually.

a) what is this and b) what is the solution ?