Most of the beginner faced the problems of Upload File Size Limit in WordPress. By default 2MB file upload size is allowed. But the limitation of upload size you can’t able to upload more than 2 MB.
If you are planning to build a WordPress site that contains larger image size and video files then you should aware it. As I already mention that by default, maximum upload file size limit ranges from 2 MB to 150MB depending on the setting of host provider.
You can check your file size limitation while uploading the media file in the media file upload section.
Ways to Solve Upload File Size Limit
There are many methods of solving the problems of upload file size limit in WordPress. If you are familiar with web programming than you can easily understand the process. Simple methods of code editing can short out the problem. You can also use plugins to increase upload file size limit too. This option is the best method for not programming users.
1. Edit .htaccess file
You can add and update the some lines of code in .htaccess with following line of code.
php_value upload_max_filesize 128M php_value post_max_size 256M php_value memory_limit 256M php_value max_execution_time 300 php_value max_input_time 300
You can find the file .htaccess in your website directory site directory.
Edit the .htaccess file and write or paste the code above. and save the file. After the change, the .htaccess file, click on Add New in Media section. You can find the changes in file upload file size limit.
The php.ini file contains the parameters required for file resource limits, timeout, and upload size. The php.ini file contains in the root directory of your site. In some conditions, it may not visible. In these conditions, you have to create new php.ini to fixed the upload file size limit.
upload_max_filesize = 40MB post_max_size = 40MB memory_limit = 30MB
3. Edit Function.php File
In some cases, the methods of upload file size limit may not work properly. In these conditions, It is the best option for you. This method also increases the upload file size limitation. Open function.php of your theme file and add the following lines of code and save the file.
@ini_set( ‘upload_max_size’ , ’50MB’ ); @ini_set( ‘post_max_size’, ’50MB’); @ini_set( ‘memory_limit’, ’300MB’ );
Similarly, you can also edit the wp-config.php file located in the root directory of your site for increase file size as an alternative method.
If you apply all the methods above may not work properly in some conditions. In this condition, you can use the plugin. Go to plugins, download, and install the Increase Max Upload Filesize plugin. Set the
upload file size limit.