How to increase Maximum upload file size

Posted March 1, 2018 6.8k views
ApacheUbuntu 16.04

In php.ini, I have the default setting uploadmaxfilesize = 16M. But when I try to upload a file, I get an error message and “Maximum upload file size: 1 MB.” Is I assume there’s another setting I need to know about. Please advise where the 1 MB setting might be.

1 comment
  • I still have a problem. I can’t upload files over 1MB. I’ve checked in php.ini and the settings there say maximum upload size is 16 MB. So there appears to be something else limiting upload size. Please advise as the 1 MB limit makes the droplet unusable for my intended use.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

When increasing your php upload size you must update both the upload_max_filesize and the max_post_size as well. Once you make the changes you’ll need to restart Apache with service apache2 restart

  • Thanks for that, postmaxsize (there is no maxpostsize in my php.ini) is also set to 16 MB. But the limit I’m hitting is 1 MB, so I’m assuming there’s another setting somewhere that limits me to 1 MB.

  • Hi, I experience the same problem. Since a couple of days. Does anyone know where to look. I did an update and upgrade of ubuntu 14.04.



You can create a php info file in order to check the current values and check which is the php.ini file in use. Create the following file in your public_hmtl folder - phpinfo.php and put the following code inside it:


You can also use the following command in order to find the location of the php.ini file:

php -i | grep php.ini

The output will be:

Configuration File (php.ini) Path => /etc/php/7.2/cli
Loaded Configuration File => /etc/php/7.2/cli/php.ini

Then check for the current value of uploadmaxfilesize you can also check which is the configuration file - php.ini that is currently used and apply the changes there (if the site using the global php.ini file and you change the values for these settings this will make the changes globally for all sites). Ideally you would like to have the following values:

upload_max_filesize = 64M

You also need to restart your web server in order the changes to take effect.

Hope that this helps!