[Drupal] The easiest way to set the max file upload size in a Drupal site

| | 1 min read

One of our clients was trying to upload a pdf file on a node page in their Drupal website. The file was more than 25 MB in size and Drupal was not allowing them to upload the file as it had crossed the max file upload limit and they needed this to be done very quickly. As we were in charge they requested to come up with an easy way to do that. If you want to now the easiest way to set the max file upload size in a Drupal site read on to know more.

The file upload limit in a Drupal site is determined by the settings in the php.ini file. We can easily override the default settings of the php.ini file provided by the web hosting company by creating a php.ini file in the root of our Drupal site.

To set the max file upload limit for your Drupal site.

  • Create a file named php.ini in the root of your Drupal site.
  • Now place the following setting in the php.ini file
    upload_max_filesize = 30M

The above setting will set the max file upload size to 30M.

Hope this was of use. We are Drupal experts and we can help you address any issues you have on your Drupal site. Get in touch with us for more details.