Performance tuning MediaWiki

Wiki browsing is significantly faster by using a PHP opcode cache.

I installed the Alternative PHP Cache, otherwise known as APC. Facebook used to use and contribute to this software.

Configuration is achieved via a simple 3-step process.

  • Install APC (PHP Extension)
  • Install the MediaWiki APC Extension
  • Configure MediaWiki’s LocalSettings.php
  • yum -y install php-pecl-apc
    ## Check the options
    php -i | grep apc
    ## Read through the configuration options
    less /usr/share/doc/php-pecl-apc-3.1.9/INSTALL
    cd /var/www/html/mediawiki/extensions
    git clone

    Edit /var/www/html/mediawiki/LocalSettings.php and add :

    $wgGroupPermissions['apc']['apc'] = true; 

    After testing the improved latency to your wiki, you may then want to view your opcode cache statistics, i.e. hits and misses :

    Further reading :

    This entry was posted in mediawiki. Bookmark the permalink.

    One Response to Performance tuning MediaWiki

    1. Glitchdata says:

      Thanks for the optimisation tips. More MW optimisations noted here:

    Leave a Reply

    Fill in your details below or click an icon to log in: Logo

    You are commenting using your account. Log Out /  Change )

    Google+ photo

    You are commenting using your Google+ account. Log Out /  Change )

    Twitter picture

    You are commenting using your Twitter account. Log Out /  Change )

    Facebook photo

    You are commenting using your Facebook account. Log Out /  Change )


    Connecting to %s