Manual:Index.php

Index.php is the main access point for a MediaWiki site. The other main access point is  which handles requests for the MediaWiki .

Actions taken
Most requests result in the following actions in :


 * 1) First, it includes  (svn-ws>svn:trunk/phase3/includes/WebStart.php|SVN), which includes  and  (svn-setup>svn:trunk/phase3/includes/Setup.php|SVN).
 * 2) Next it instantiates a MediaWiki object called  which is defined in .
 * 3) It then checks the maxlag>Special:MyLanguage/Manual:Maxlag parameter</>|maxlag parameter, which may cause the request to be rejected.
 * 4) It calls the function   in <tvar|wiki></>, which creates a <tvar|title></> object depending of the title and action parameters from the URL.
 * 5) If useajax>Special:MyLanguage/Manual:$wgUseAjax</>|ajax is enabled and the   parameter is set to , then an [<tvar|dispatcher>http://svn.wikimedia.org/doc/classAjaxDispatcher.html</> AjaxDispatcher] object will be created to handle that request and the script will stop after that.
 * 6) Otherwise some globals are stored in <tvar|mW></> to be used in the next steps.
 * 7) It calls   which does most of the work of the request.
 * 8) Then   is called.  That function does the deferred updates, runs jobs from the queue depending on <tvar|rate></> and outputs the HTML by calling.
 * 9) Finally,   is called to log profiling data.

Version 1.18 and higher
As of MediaWiki version 1.18, some of the startup logic has been moved from index.php, and index.php performs the following actions:
 * 1) Check the version of PHP and if its not 5.2.3 or higher, display an error.
 * 2) Include <tvar|webstart></> (svn-ws>svn:trunk/phase3/includes/WebStart.php</>|SVN), which in turn includes <tvar|localsettings></>, <tvar|setup></> (svn-setup>svn:trunk/phase3/includes/Setup.php</>|SVN) and some other files.
 * 3) Instantiate a MediaWiki object called <tvar|mW></>, which is defined in <tvar|wiki></>.
 * 4) Call.