written by cail • posted in How-To • 1,021 views no comments

Most instructions that I could find online are for Apache powered sites and somewhat outdated.

Below is what I did for my nginx + php5-fpm powered Mediawiki.

Assume you want to increase from the default 2M to 8M.

  1. in the Ngix configuration file, include the following
    client_max_body_size 8m;
  2. modify /etc/php5/fpm/php.ini file, adjust to the following
    post_max_size = 8M
    upload_max_filesize = 8M
  3. modify ~/wiki/LocalSettings.php file, add the following
    $wgUploadSizeWarning = 5*1024*1024;
    $wgMaxUploadSize = 8*1024*1024;
  4. service php5-fpm restart; service nginx restart

Please note that the $wgMaxUploadSize value is not enforced for local file uploading and the most critical one is to modify the php.ini file.

Previous:
Next:

Leave a Reply

QR code of this post

blog by cail