In WordPress, you can upload media files and attach to your post. But there is the limit of the maximum upload size. This depends on the upload limit provided by your web host. Few hosts only allow as low as 1 MB file size. This size is sufficient if your blog does not need high quality images or videos. But what if you want to increase file upload size limit? In this post, we are adding few ways of increasing max upload file size limit in WordPress.
These methods may not work for few web hosts. If you are unable to resolve problem after following given ways, you will have to contact your web hosting provider. Good web hosts like Hostgator and BlueHost will provide good customer support.
1. Functions.php Method
Use the three lines given below and add at the top of functions.php file. And then try uploading large files in your WordPress blog.
@ini_set( 'upload_max_size' , '64M' );
@ini_set( 'post_max_size', '64M');
@ini_set( 'max_execution_time', '300' );
2. Htaccess method
You can also try htaccess method. You only need to add given lines in the .htaccess file. It can be found in the root directory. Be sure to take backup of this file before doing any changes. If you are unable to find this file in root directory, show hidden files.
Add these lines
php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300
3. Plugin way
If you think that you are not brave enough to modify files, you can try plugin way. Install Increase Upload Max Filesize plugin and it will increase the file size upload limit to 32 MB.
If all these methods are not working, it means your web host has disabled all the ways to increase the file upload size limit of your hosting account. So, you need to contact in support.