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.
- in the Ngix configuration file, include the following
- modify /etc/php5/fpm/php.ini file, adjust to the following
post_max_size = 8M upload_max_filesize = 8M
- modify ~/wiki/LocalSettings.php file, add the following
$wgUploadSizeWarning = 5*1024*1024; $wgMaxUploadSize = 8*1024*1024;
- 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.