Increasing Drupal's File Size Upload Limit

 

Image UploadBy default, most Drupal setups have an upload file size limit of 2 megabytes. That's enough for uploading most content like images and short Word documents and PDF files. But start uploading larger files like audio or video, and you'll quickly run into this frustrating upload limit. Some video files can be hundreds of megabytes! Here's how you can get around the limit.

First, Modify Drupal

  1. Go to your Admin menu. Under Site Configuration, select File Uploads
  2. Find the Default maximum file size per upload and set it to 128mb

    Second, Modify Apache

    1. Find your php.ini file. On my machine, this is located at /etc/php5/apache2/php.ini
    2. Find upload_max_filesize and change it so it reads:
      upload_max_filesize = 128M
    3. Find post_max_size and change it also:
      post_max_size = 128M
    4. Restart apache

    Yay, you should be able to upload huge files now! Make sure you set your up your per-user upload settings if you want non-admin users to be able to upload huge files.

    Alternate Apache Option: Edit your .htaccess file

    If you don't have access to your php.ini file, you should be able to set the php options in your .htaccess file using the following syntax:

    php_value upload_max_filesize 128M
    php_value post_max_size 128M

5 Comments

A couple of comments

There doesn't seem to be a File Uploads place in Site Configuration.

I added the values suggested in the .htaccess file, but this made no difference.

Any thoughts Dave?

Robert

Dave's picture

A couple ideas

Are you running Drupal 6? Have you enabled the Upload module on the module configuration page?

Modifying Drupal's upload file size limit - error - HELP!!!

Dear Dave,

We are two people creating a website for a project using Drupal. Yesterday we were trying to upload a .pdf file which was considerably bigger than the 2MB allowed by default. So I ran across your website and my colleague tried to modify the .htaccess file, according to your instructions. Sth. must have happened because since then we are not able to access the admin node anymore and we are getting this 'Error 500 - Internal server error' message.

Since we're completely desperate about the situation (we have been busting our backs to create the content on the site for the last 2 weeks), I am hereby contacting you to ask for help.

Thank you very much in advance!

All the best,
Monica Z.

Did you enjoy this post? Please spread the word.