How to increase the file size limit for media uploads?

This is due to the PHP limitations on file size uploads. If you have access to your php.ini file, you can modify the following lines:

upload_max_filesize = 10M
post_max_size = 10M
max_execution_time = 300

If you don’t have access to the php.ini file (such as a hosting situation), you may need to contact your webhost and see if they will increase it for you. I have also seen users create a php.ini file with just these values and place it in the file where WordPress is installed. If your PHP instance allows for “inherited configurations” it will allow these local settings to override the global.

The other solution would be to add the code dynamically into WordPress to make this change for you. This article has a nice way of doing it through a “plugin”. I’ve seen dubious results from this approach (some report success, some report no success) so I can’t say for sure if it will work for you.

Leave a Comment