<p>My guess is that your php <code>upload_max_filesize</code> is set to 16M, you'll need to adjust that.</p>

CC BY-SA 4.0
2018-07-26T21:15:42.723Z
2018-07-26T21:15:42.723Z
Brett Moore
<p>Since Craft 2.1 there is a setting <code>maxUploadFileSize</code> in <code>craft/config/general.php</code>. You should change this setting as well. Default value is 16777216 (16MB).</p>

<p><a href="https://docs.craftcms.com/v2/config-settings.html#maxuploadfilesize" rel="nofollow noreferrer">https://docs.craftcms.com/v2/config-settings.html#maxuploadfilesize</a></p>

CC BY-SA 4.0
2019-05-31T21:23:15.247Z
2019-05-31T21:23:15.247Z
Dusan
<p>I'm adjusting the maxUploadFileSize in Craft, to 50MB.<br>
In following the post below, I made several adjustments to both: php.ini and craft/config/general.php.
<a href="https://stackoverflow.com/questions/3263480/upload-max-size-in-php">https://stackoverflow.com/questions/3263480/upload-max-size-in-php</a></p>

<p>First, I adjusted settings in php.ini:</p>

<pre><code>upload_max_filesize 
post_max_size
</code></pre>

<p>In general.php (craft/config), the following was already set:</p>

<pre><code>  define('URI_SCHEME',  ( isset($_SERVER['HTTPS'] ) ) ? "https://" : "http://" );
  define('SITE_URL',    URI_SCHEME . $_SERVER['SERVER_NAME'] . '/');
  define('BASEPATH',       realpath(CRAFT_BASE_PATH . '/../') . '/');

 return array(

  '*' =&gt; array(
        'environmentVariables' =&gt; array(
        'omitScriptNameInUrls' =&gt; true,
        'siteUrl'  =&gt; SITE_URL,
        'basePath' =&gt; BASEPATH,
        'maxUploadFileSize' =&gt; 62914560,
        ),
  ),
  'dev' =&gt; array(
    'devMode' =&gt; true,
  )


 );
</code></pre>

<p>I know that that is around 62MB, but I keep receiving an error message saying that there is a 16MB limit on files.  All other files great than 2MB and less than 16MB now are upload-able.<br>
Can anyone make a suggestion as to why the standard CraftCMS default of 16MB is now in place?</p>

<p>Thanks for any leads</p>

CC BY-SA 4.0
2018-07-25T21:23:33.220Z
Basic question, but worth a double check. Is your `maxUploadFileSize` setting being applied to your current environment?
Simon Kuran
CC BY-SA 4.0
2018-07-25T22:17:28.653Z
Go into the Utilities section in the Control Panel, click on PHP info and do a Cmd/Ctrl+F for `upload_max_filesize`. Does it say `50M`?
Mats Mikkel Rummelhoff
CC BY-SA 4.0
2018-07-25T22:26:33.103Z
Also, what web server is this? For Nginx, for example, you'll want to do `client_max_body_size 0;` to set it to "no limit" https://github.com/nystudio107/nginx-craft/blob/master/sites-available/somedomain.com.conf
andrew.welch
CC BY-SA 4.0
2018-07-26T20:05:59.040Z
Thanks - this is IIS - Windows Server.
Regarding applying maxUploadFileSize to my current environment, is there a command which will reveal which settings are being applied from which (if there are multiple) general.php file?
buck1112
CC BY-SA 4.0
2018-07-26T21:58:04.560Z
Is this Craft 2 or Craft 3?
Brad Bell
CC BY-SA 4.0
2018-07-27T16:16:17.040Z
This is Craft 2
buck1112
CC BY-SA 4.0
2018-08-28T05:14:25.630Z
IIS has a maxAllowedContentLength setting you can adjust in web.config that you might be running into.
Brad Bell
<upload><limit>
Adjusting Max File Size - Stuck at 16M After Adjusting general.php
# Adjusting Max File Size - Stuck at 16M After Adjusting general.php

(Asked by: username_0 on 2018-07-25)

I'm adjusting the maxUploadFileSize in Craft, to 50MB.
In following the post below, I made several adjustments to both: php.ini and craft/config/general.php.
https://stackoverflow.com/questions/3263480/upload-max-size-in-php
First, I adjusted settings in php.ini:
upload_max_filesize 
post_max_size

In general.php (craft/config), the following was already set:
  define('URI_SCHEME',  ( isset($_SERVER['HTTPS'] ) ) ? "https://" : "http://" );
  define('SITE_URL',    URI_SCHEME . $_SERVER['SERVER_NAME'] . '/');
  define('BASEPATH',       realpath(CRAFT_BASE_PATH . '/../') . '/');

 return array(

  '*' => array(
        'environmentVariables' => array(
        'omitScriptNameInUrls' => true,
        'siteUrl'  => SITE_URL,
        'basePath' => BASEPATH,
        'maxUploadFileSize' => 62914560,
        ),
  ),
  'dev' => array(
    'devMode' => true,
  )


 );

I know that that is around 62MB, but I keep receiving an error message saying that there is a 16MB limit on files.  All other files great than 2MB and less than 16MB now are upload-able.
Can anyone make a suggestion as to why the standard CraftCMS default of 16MB is now in place?
Thanks for any leads

**Tags:** upload, limit
> **Comments:**
> **username_1**: Basic question, but worth a double check. Is your `maxUploadFileSize` setting being applied to your current environment?  
> **username_2**: Go into the Utilities section in the Control Panel, click on PHP info and do a Cmd/Ctrl+F for `upload_max_filesize`. Does it say `50M`?  
> **username_3**: Also, what web server is this? For Nginx, for example, you'll want to do `client_max_body_size 0;` to set it to "no limit" https://github.com/nystudio107/nginx-craft/blob/master/sites-available/somedomain.com.conf  
> **username_0**: Thanks - this is IIS - Windows Server. Regarding applying maxUploadFileSize to my current environment, is there a command which will reveal which settings are being applied from which (if there are multiple) general.php file?  
> **username_4**: Is this Craft 2 or Craft 3?  
> **username_0**: This is Craft 2  
> **username_4**: IIS has a maxAllowedContentLength setting you can adjust in web.config that you might be running into.  

---

## 2 answers

### Answer by username_5 on 2018-07-26. Score: 1

My guess is that your php `upload_max_filesize` is set to 16M, you'll need to adjust that.


---

### Answer by username_6 on 2019-05-31. Score: 1

Since Craft 2.1 there is a setting `maxUploadFileSize` in `craft/config/general.php`. You should change this setting as well. Default value is 16777216 (16MB).

<https://docs.craftcms.com/v2/config-settings.html#maxuploadfilesize>


---

