Quick mediawiki information

If you’d like to change the default upload size limit in mediawiki from 20MB, or if you are uploading files between 8MB and 20MB and the uploads fail, here’s how to increase the file size limit (for ubuntu/debian/jumpbox):

  1. SSH into the mediawiki server and login
  2. Enter the following commands:
  • cd /etc/php5/apache2
  • sudo nano php.ini
  • Search for upload_max_filesize and modify for the newly desired maximum file size
  • Search for post_max_size and match the upload_max_filesize size entered
  • Save changes and restart service: sudo service apache2 restart

If you want to change what filetypes are allowed, edit /storage/mediawiki/LocalSettings.php (or whatever location you’ve installed mediawiki to) and edit $wgFileExtensions to include the new filetype extension by adding it to the array… like so:

  •  $wgFileExtensions = array(‘png’,’gif’,’jpg’,’jpeg’,’doc’,’xls’,’pdf’);

The above code adds pdf upload support to mediawiki, also make sure that $wgEnableUploads is set to ‘true’ in the same file.


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *