4 ways to increase maximum upload limit file size in media of wordpress

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.

3 ways to increase maximum upload limit file size in media of wordpress

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.

  1. PHP version change
  2. .htaccess way
  3. Theme’s Functions.php File
  4. 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?

Solution 1: PHP version change

This is open method. Upgrade your PHP version by following way,
cpanel -> software and services -> Select PHP Version.
Thanks @SΓ©rgio

Solution 2: using .htaccess way

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

Solution 3: Theme’s Functions.php File

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’ );

Solution 4: PHP.INI file method

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

Just share...Share on FacebookShare on Google+Tweet about this on TwitterPin on PinterestEmail this to someone
The following two tabs change content below.
I am Karthik, software engineer by profession. You can find and follow me, from Social Media or here. Google+

Latest posts by karsho (see all)

This entry was posted in General, Wordpress.

20 Responses to 4 ways to increase maximum upload limit file size in media of wordpress

  1. joan says:

    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

  2. joan says:

    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

  3. karsho says:

    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.

  4. joan says:

    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.

  5. Pradeep says:

    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.

  6. Matt says:

    Tried all three both one at a time and all together at once. Didn’t change a thing. Any suggestions? Thanks for the post.

  7. ravi says:

    if i am changing in .htaccess file url displaying error plz give suggestions

  8. Abdul Aziz says:

    i have followed these three options but still it’s showing 8 mb maximum limit………

  9. Nooriji says:

    For all who want to copy and paste … it is NOT ‘upload_max_filesize = 1024M’ , but ‘upload_max_file_size = 1024M’

  10. Hazwan Hamdan says:

    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.

  11. aqeel says:

    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

  12. sajid says:

    dear karsho bundles of thnx………….its working.

  13. solomon says:

    Thanks alot, copy pasting the contents in Solution 1into .htaccess in root folder worked. (wordpress 4.0.1)

  14. Dj Kanji says:

    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?

  15. Vannrith says:

    Thanks very muck for the tutorials πŸ˜€
    I did all these 3 options and it works πŸ˜€

  16. vijay says:

    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.

Leave a Reply

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

Please Fill this Sum * Time limit is exhausted. Please reload the CAPTCHA.