Maximum file upload size in Moodle

May 16, 2011 — 3 Comments

In Moodle 2.X, by default maximum upload file size is 2MB. How do you increase the max upload size for Moodle?

The solution which you see here apply to you if your Moodle is running in a Shared Hosting.  Right now my Moodle site is hosted at Bluehost.com and using cPanel.

1. Use your FTP client and connect to your Moodle server and open public_html folder.  In public_html folder you will find a file called php.in.  Click on php.in file and press edit button.

Editing PHP.INI fine in Moodle

2.  The php.in file which you open will have one line.  You need to add

upload_max_filesize = 20M
post_max_size = 20M

to your php.in file and save the file to your server.  If you want to increase the file size just change the numbers

Upload Max file Size  in Moodle

3.  Now login to your Moodle site as administrator
Go to Site Administration | Security | Site Policies | Maximum Uploaded file section

This specifies a maximum size that uploaded files can be throughout the whole site. This setting is limited by the PHP settings post_max_size and upload_max_filesize, as well as the Apache setting LimitRequestBody. In turn, maxbytes limits the range of sizes that can be chosen at course level or module level. If ‘Server Limit’ is chosen, the server maximum allowed by the server will be used.

Click on the drop down list and you should see your new maximum uploaded file size in Moodle.  Select your new maximum uploaded file size and click OK


maximum_uploaded_file_moodle

4. Also go to Course Administration | Edit Settings|  if you don’t see the new maximum uploaded file size , just click on the dropdown and apply new size 

edit_course_settings_maximum_upload_size

3 responses to Maximum file upload size in Moodle

  1. 

    Very simple to change maximum upload file size with SharePoint 2010 / Rất đơn giản để thay đổi kích cỡ tối đa của file tải lên với SharePoint 2010 http://sharepointtaskmaster.blogspot.com/2011/05/very-simple-to-change-maximum-upload.html

  2. 

    hello i have followed these very clear instructions but the max upload filesize is still set to 2MB in site admin > security > policies. i copied your php.ini file exactly.

    do you need to restart the apache server to make this work?

    Moodle 2.0.2+ (Build: 20110406)

  3. 

    hello buddy, i’m using moodle 2.2 and I didn’t find this file “php.ini” in it. Do you know if the file exists in moodle 2.2?

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s