Improve your MediaWiki performance

From The IT Community
Jump to: navigation, search




When you start a new wiki (like The IT Community) performance might be OK, since you don´t have that many visitors. But when the hits go up, performance goes down.

If you host your wiki on your own server, there are many tweaks that you can make, but what if you let a provider host it?


Here are some options you can set in your LocalSettings.php which should work, even if your provider has a very restrictive policy, and which should improve your MediaWiki performance:

$wgMainCacheType    = CACHE_ANYTHING;
$wgMessageCacheType = CACHE_ANYTHING;
$wgParserCacheType = CACHE_ANYTHING;
$wgMemCachedServers = array();

$wgEnableSidebarCache = true;
$wgUseGzip = true;

$wgHitcounterUpdateFreq = 100;


The first four lines tell your wiki to cache anything as long as it works. This is a sort of auto-optimization, MediaWiki sets the best cache-setting for you.

The next line tells MediaWiki that we want to cache the Sidebar too.

UseGzip says, that pages will be served compressed to clients that support it, which save bandwidth.

The last setting tells MediaWiki how often to refresh the hit counter at the bottom of each page. The default value is 1, the higher you go the fewer MediaWiki has to access its database.



Was this article helpful? Then please donate to keep The IT Community alive...

If you found this article helpful please share it, comment and help others by writing your own article.






Translate this page:




Articles found in the same category:
(max. 20 shown)