Changing the limit on uploaded file size in PHP

If you have your own server, you can change the values for post_max_size and upload_max_filesize in the php.ini file. You will usually find this file in /apache/bin.

If you are using someone else's server (such as a hosting service), you probably can't change anything in php.ini. Try creating a file called .htaccess in the root of your Moodle installation that contains the following lines:

php_valuevaluepost_max_sizesize128M 
php_valuevalueupload_max_filesizefilesize128M 

Replace 128M with any value that you need. If the server times out while uploading large files, you might add lines like the following to .htaccess:

php_valuevaluemax_input_time 600 
php_valuevaluemax_execution_time 600 

The ...

Get Moodle 3 E-Learning Course Development - Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.