By default there is a limitation set on maximum filesize to 2mb.
To change that we need to locate the php configuration file
First you will have to ssh into your Ubuntu webserver.
php.ini can be found in
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.
Thomas F. Christensen July 16th, 2017
Posted In: Ubuntu