User:Aaron Schulz/How to make MediaWiki fast

1. Install eaccelerator (or APC)

2. To localsettings.php, add (replace dirs as needed):  /***********OPTIMIZED***********/ $wgMainCacheType = CACHE_ACCEL; $wgMessageCacheType = CACHE_ACCEL; $wgLocalMessageCache = 'C:\Server\xampp\htdocs\MW_trunk\MsgCache'; $wgParserCacheType = CACHE_ACCEL; $wgMemCachedServers = array; $wgShowIPinHeader = false; $wgUseFileCache = true; $wgFileCacheDirectory = 'C:\Server\xampp\htdocs\MW_trunk\cache'; $wgUseGzip = true; $wgEnableSidebarCache = true; $wgDisableCounters = true; $wgMiserMode = true; $wgCompressRevisions = true; $wgRevisionCacheExpiry = 3*24*3600; $wgParserCacheExpireTime = 14*24*3600; $wgDiff = 'C:/Server/xampp/htdocs/MW/bin/GnuWin32/bin/diff.exe'; $wgDiff3 = 'C:/Server/xampp/htdocs/MW/bin/GnuWin32/bin/diff3.exe'; /***********/  3. Set the $wgFileCacheDirectory and $wgLocalMessageCache as needed
 * 1) Shared memory settings
 * 1) File cache!
 * 1) NO DB HITS!
 * 1) Text cache
 * 1) Diffs

4. You can set up Memcached. If you do, set $wgMainCacheType and $wgParserCacheType to CACHE_MEMCACHED in localsettings.php instead. This is recommended.

5. Run maintenance/rebuildFileCache.php if you have the space.

6. Set $wgJobRunRate to 0 and set up a crontab or shell script to run jobs (like this with this for example). With $wgJobRunRate at 0 and the above changes, you should be able to avoid db hits on many requests.

7. Set $wgDiff and $wgDiff3 to gnu diff utility (download as needed). This is recommended. The default PHP diff code is slow and crashy.

8. Edit the MediaWiki:Aboutsite and MediaWiki:Pagetitle system messages by changing into your site name. This avoids extra parsing on each hit.