.htaccess forcing larger file uploads

So this is something that I should have memorized by now, but always find myself searching Google whenever I need it. MediaTemple’s Grid Servers have a built in 2mb limit on file uploads, which is small when you’re trying to upload photos from new multi-megapixel cameras, or even just large PDFs. The solution is to drop the following code into the .htaccess file in the root directory:

php_value upload_max_filesize 20M
php_value post_max_size 20M

This next bit usually helps if the uploads are timing out.

php_value max_execution_time 200
php_value max_input_time 200

This usually does the trick!

Leave a comment

Your email address will not be published. Required fields are marked *