How to increase maximum media library file upload size in WordPress — 3 different ways

There are at least 3 different ways to increase the maximum file upload size in WordPress.

1. Update .htaccess

.htaccess is a file located in the root directory of your WordPress installation (in case your hosting provider uses Apache as a web server). Open the file in a text editor and insert or edit the values as needed.

The max_execution_time and max_input_time values are in seconds and might need to be increased further depending on the maximum size of the file(s).

An example how to set the maximum file size (and maximum form post size) to 512 MB and the time limit to 10 minutes:

php_value upload_max_filesize 512M
php_value post_max_size 512M
php_value max_execution_time 600
php_value max_input_time 600

2. Update wp-config.php

wp-config.php is a file located in the root directory of your WordPress installation. Open the file in a text editor and insert or edit the values as needed.

The max execution time and max input time values are in seconds and might need to be increased further depending on the maximum size of the file(s).

An example how to set the maximum file size (and maximum form post size) to 512 MB and the time limit to 10 minutes:

@ini_set(‘upload_max_filesize’ , ‘512M’);
@ini_set(‘post_max_size’, ‘512M’);
@ini_set(‘max_execution_time’, ‘600’);
@ini_set(‘max_input_time’, ‘600’);

3. Contact hosting provider

Contact the customer support of your hosting provider and ask them to increase these limits for you.

Leave a Reply

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

Shared Files PRO Only $27.99