Changing the WordPress Maximum Upload File Size

Default settings for uploads are usually pretty low. The default maximum upload size for PHP is 2MB. In WordPress you also can set the upload size, but it cannot be larger than what server settings allow. Unfortunately there are several settings you might have to change to set your desired upload limit. Depending on how your server is setup, you will have to configure PHP, Apache and/or WordPress.

Inside your .htaccess you can configure the PHP settings:


php_value upload_max_filesize 100M
php_value post_max_size 100M
php_value memory_limit 196M

memory_limit should be larger than post_max_size. Not all hosters allow these settings to be changed. In that case this will probably result into a "500 Internal Server Error".

Of course you can also change these settings in your php.ini, if you have access to it:


upload_max_filesize = 100M
post_max_size = 100M
memory_limit = 196M

In some cases you also need to adjust the Apache settings (0 = unlimited) in your .htaccess or VirtualHost:


LimitRequestBody 0

If you are running a multisite setup, you also have to configure appropriate WordPress settings.

Multisite upload size settings
Under Network Admin > Settings you can adjust "Site upload space" and "Max upload file size"
Site Upload Quota
Go to Network Admin > Sites and then under Path > Edit > Settings you can adjust "Site Upload Space Quota"

References: