Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By sudofix on
I am having trouble understanding how and where to put the code to allow me to upload files that are bigger than 2MB to my Drupal website.
I changed the maximum user upload space to 100MB and each file to 5MB and tried, and when I do, it just hangs.
Someone told me that I need to put some code in to the .htaccess or some PHP file somewhere to allow the PHP to allow bigger than 2MB files, and more than 2MB collectively to be added in the uploads.
Can anyone give me a bit more detail as to where this goes?
Comments
If your host allows it, you
If your host allows it, you can probably change this in either .htaccess or php.ini with something like this:
upload_max_filesize = 5M (php.ini)
php_flag upload_max_filesize = 5M (.htaccess)
Where is the php.ini located
Where is the php.ini located on my server? Also, about what line would I add this to the .htaccess file? Can I just drop it in after the last line?
view a phpinfo file to see
view a phpinfo file to see where php.ini is. It can be in a number of places depending on how you installed PHP in the first case. (see the troubleshooting guide or search)
If it's not your server and you are on a shared host, raise a ticket with your sysadmin, as you probably don't have rights to do something as potentiallly painful to a server as make it traffic 100MB files. The default limits were there for a reason.
.dan.
How to troubleshoot Drupal | http://www.coders.co.nz/
.dan. is the New Zealand Drupal Developer working on Government Web Standards
I am on a shared host, and
I am on a shared host, and so now that makes sense when you put it that way.
I don't really want to make 100MB files, I was just wondering how to change it, so I can up it to around 5MB total. That's all.
I have the same problem
I'm trying to update Drupal 7.2 to 7.4 and it's larger that 2MB, so I can't update it. How do I do it?