Home / admin / Increase max file size upload limit from 2MB
  • How to Increase max file size upload limit from 2MB


    The default file size upload limit is not set by wordpress, open the php.ini file and fined the line upload_max_filesize = 2M and change it to the sample bellow 64M should be fine.

    ( click code to copy )

    wordpress snippet : PHP.INI

    upload_max_filesize = 64M

    ( WordPress codex functions, hooks, in this snippet. )

  • Guest

    You should probably also change the “post_max_size” to “64M” also. 

  • I tried the trick in my local machine using WAMP server. Afte r changing the line of code in php.ini file, I restarted the server and checked. But it is showing only 8MB max size. When I try to upload 10MB file it is showing “This file exceeds the maximum upload size for this site.”

    • Try adding “post_max_size 64M” to it as well.

  • Tip. Edit the php.ini. (without a BOM for notepad++)
    search and replace :

    upload_max_filesize = 64M
    post_max_size = 64M
    max_execution_time = 300

    and then restart apache.

  • patrick

    the best option to use is php.ini but many coder or developer just don`t know how to teach other people very simple way of doing it, this is my second time of doing it and I can tell you where you are making the mistake.
    Log into your root server where wordpress is installed and navigate to wp-admin folder and make sure to delete any php.ini file in that folder if any, then open your NOTE-PAD and paste the code below

    memory_limit = 200M
    upload_max_filesize = 200M
    post_max_size = 200M
    file_uploads = On

    now save it as php.ini and upload it to your wp-admin folder, now you can check your wordpress to see the size limit

    important note: php.ini must be in small letters like abcd and not ABCD that is you must save it with php.ini and not PHP.ini that is where most people where having problem, and if you which to change your size again, delete the file and create another one with the same process.