Ubuntu 18 : PHP Allow bigger file uploads

I found that the default is 2 megabyte with post upload limit of 8 megs. This is not enough these days anymore.

I found in Ubuntu 18 with PHP 7.2, that I have my php.ini file to reside here: /etc/php/7.2/apache2

Edit it:

sudo nano -w /etc/php/7.2/apache2/php.ini

And find:

post_max_size = 8M

Change this to a higher value like 16M

Then find:

upload_max_filesize = 2M

Change this to a higher value like 8M or 12M

The values depend on your server hardware, and what you wish to upload to your sites.

Then restart the web server:

sudo service apache2 restart

Posted

in

by

Tags: