You want to increase the maximum file upload size in WordPress. There are times when low file upload size limits can prevent you from uploading files via media uploader, or installing plugins and themes. In this article we will show you how to easily increase the maximum file upload size in WordPress to solve these problems.
Note: This is a medium-level tutorial. It may not work for some shared hosting, in which case you will have to ask your hosting provider for support. We use HostGator and they are very useful when it comes to such problems.
When you upload an image or media, WordPress automatically displays the maximum file upload size limit. To check it, you can simply go to media ‘ add new page and you will see the maximum file uplaod size limit of your WordPress sit
1: Theme Functions File
There are cases where we have seen that just by adding the following code in theme’s functions.php file, you can increase the upload size:
2. Update .htaccess file
php_value upload_max_filesize 128M
php_value post_max_size 128M
php_value memory_limit 256M
php_value max_execution_time 300
php_value max_input_time 300Advertisement
Change the numbers to the values that you need. The max execution time and max input time values are in seconds and might need to be increased further if your internet connection is slow.
3. Update wp-config.php file
@ini_set( ‘upload_max_filesize’ , ‘128M’ );
@ini_set( ‘post_max_size’, ‘128M’);
@ini_set( ‘memory_limit’, ‘256M’ );
@ini_set( ‘max_execution_time’, ‘300’ );
@ini_set( ‘max_input_time’, ‘300’ );
4. Contact your hosting provider
Reach over to the customer support at your hosting provider and ask them to help increase these limits for you
Again, it is important to emphasize that if you are a shared hosting package, then these technologies may not work. In this case, you will have to contact your web hosting provider to increase your limits.
We strive for accuracy and fairness. If you see something that doesn’t look right, contact us!