by Thomas F. Christensen

By default there is a limitation set on maximum filesize to 2mb.

To change that we need to locate the php configuration file php.ini

First you will have to ssh into your Ubuntu webserver.

php.ini can be found in /etc/php/7.0/apache2

nano /etc/php/7.0/apache2/php.ini

It’s a huge file and you will have to look for two things in order to increase maximum file size:

; Maximum size of POST data that PHP will accept.
post_max_size = 2M

; Maximum allowed size for uploaded files.
upload_max_filesize = 2M

Simply change the value from 2M to whatever size fits your needs and save the file

To save your file using nano editor pres Ctrl + y and enter.

sudo service apache2 restart

Thats it you are done, now you can upload files or pictures of the size you have specified.

July 16th, 2017

Posted In: Ubuntu

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: