How to increase maximum upload limit file size in media of wordpress?, Who working with wordpress, they may get this problem.
The latest version (3.9) of wordpress Maximum Media library file upload size is 32MB. It was 10MB in version (3.6). If you are using old version then it allow maximum 2MB file upload limit only. You want upload more than 32MB files, you must increase that. For example you want upload some zip files for download, or audio, video, flash and other video Media files means, this 32MB also not enough.
Increase maximum upload limit file size in media of WordPress
There is 4 ways to increase maximum upload limit file size in media of wordpress.
- PHP version change
- .htaccess way
- Theme’s Functions.php File
- PHP.INI file method
Here, I’m going to change my maximum upload limit from 32MB to 1GB (1024MB) using above methods. We have to change maximum execution time also.
Notes:
Take backup of .htaccess file, functions.php file or php.ini file, which method you are going to use. It’s important. Use one-by-one methods. Some methods may not support, because of wordpress versions. How to Install WordPress in Local Server?
This is open method. Upgrade your PHP version by following way,
cpanel -> software and services -> Select PHP Version.
Thanks @SΓ©rgio
You can get .htaccess file from root folder of your website. Mostly it’s hidden. So using FTP makes sense. Or you have to open your file manager with hidden files.
If there is no .htaccess file, create and upload/paste in root (before creating .htaccess file, make sure there is no .htaccess file). Paste the following code,
php_value upload_max_filesize 1024M
php_value post_max_size 1024M
php_value max_execution_time 1000
php_value max_input_time 1000
In this 4 methods, this is easy way. Open your theme’s functions.php file. You can find function.php file by following way,
wp-content β> themes β> select your current Theme -> functions.php file
And, just add following code at there,
@ini_set( ‘upload_max_size’ , ‘1024M’ );
@ini_set( ‘post_max_size’, ‘1024M’);
@ini_set( ‘max_execution_time’, ‘1000’ );
You can find your php.ini file in root folder. Sometime you can’t find there. No problem, just create one php.ini file and paste/upload in your root folder with following code. If already file is there, just add this code,
upload_max_filesize = 1024M
post_max_size = 1024M
max_execution_time = 1000
for More…
If you get help from this, just give your Golden Comments.
Extra: Solution for Fatal error: Maximum execution time of 30 seconds exceeded
Latest posts by karsho (see all)
- Increase maximum query size max_allowed_packet for MySQL - March 29, 2020
hi karsho, i have the lastest 3.9 wordpress, but in the media upload it is only “Maximum upload file size: 2MB.” not 200MB. and i am looking for a solution to increase it to upload MP3 files. i saw your post on the wordpress forum, within a few minutes of me posting. i do not have access to a cpanel. meanwhile i will read what you’ve written here. thank you, joan
Thanks for your comments. It’s default is 2MB or 32MB, that’s not a problem.
3rd method would be the one i would do, but where would i add it, in the theme functions the very long list? i’d be happy to have 64MB increase. joan
very long list? means?
If you have wp-admin access only means, go-to
Appearance -> Editor-> select Theme Functions (functions.php) file
, at there put anywhere ( better paste in end of the file ) and save it.oh i have stuffed it up. syntex error. i’m getting someone later today to unlock my website.
please delete all my comments here please. and thanks for your help anyways.
Hey I have tried first two methods and I do not have access of cpanel access. I am not getting solution. Please let me know how to tackle this.
Tried all three both one at a time and all together at once. Didn’t change a thing. Any suggestions? Thanks for the post.
if i am changing in .htaccess file url displaying error plz give suggestions
i have followed these three options but still it’s showing 8 mb maximum limit………
For all who want to copy and paste … it is NOT ‘upload_max_filesize = 1024M’ , but ‘upload_max_file_size = 1024M’
Sorry, I was wrong … the c&p is correct !
Attention! These tricks are not supported by all servers / control panel. I just think it can works on HostGator server only. Just that’s it.
dear karsho thanks for solution, through you i found php.ini solution,
yes this problem can be solved easily but i was not able to find these files i am new to wordpress so the same was searching for this.The easiest way of increasing upload size limit is to edit php.ini through server i have done this through this way
go to your server( i am using xampp), click config button for apachi select PHP (php.ini)
file will be opened in note pad, search for this code “post_max_size=80M” and “upload_max_filesize=20M” as well
increase the value before M letter as u require and save that file.
NOTE: word press may automatically select the less input size entered in between post_max and upload_max so be careful if u increase the value of upload_max size the word press may select value of post_max
i recommend to edit both field
Thanks
aqeel from SIndh
Thanks Aqueel.
Thank you man, i was looking for answer all day. I didn’t know it was this easy π
just one thing, after making this change, go to xampp, stop action and than run it again and it will work ( ofc, refresh your page)
dear karsho bundles of thnx………….its working.
Thanks alot, copy pasting the contents in Solution 1into .htaccess in root folder worked. (wordpress 4.0.1)
Hello, i have video mixes of more then 4GB and i wanna upload to my site, i have tried but can’t go through, max upload limit is 32mb, can i please find the solution to this?
Thanks very muck for the tutorials π
I did all these 3 options and it works π
Thank You SOSOOSOSOSOOSOSOSOSOSOSOS much,i have been finding the solution all over the web but no luck,finally youre post 1 step worked for me.