How to set up file cache for MediaWiKi

No GoodNeed ImprovementOKGoodExcellent (No Ratings Yet)
Loading ... Loading ...

Create a cache directory and make sure Mediawiki can write to it:

mkdir -p /disk2/wikicache

chown -R apache:apache /disk2/wikicache

chmod -R 777 /disk2/wikicache

Then enable file cache by adding the following lines to LocalSettings.php:

$wgUseFileCache = true;
$wgFileCacheDirectory = “/disk2/wikicache”;
$wgShowIPinHeader = false;
$wgUseGzip = false;

You can use tmpwatch to limit the size of cache on Linux.

Popularity: 1%

Leave a Comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word