Support » Fixing WordPress » Max file upload

  • Resolved Ivaseg


    My php.ini settings:
    upload_max_filesize 10M
    post_max_size 10M

    But WordPress 3.1.1 still dislpay restriction to 2M max file size upload. How to fix? I’ve use IIS 7.5 + PHP5.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Did you get a chance to try restarting IIS after you made the changes in php.ini?

    yes, I’ve did it many times but still see 2M limit and <?php phpinfo(); ?> display me 10M limit 🙁

    I think this is WordPress bug because I’ve tested file upload with simple php script and I was upload file more than 2Mb but WordPress still don’t give me a chance to upload files more than 2Mb

    I’m not sure that it’s actually wordpress related. I have mine set at 8mb in php.ini and it works fine, but I use linux and apache, rather than Windows and IIS.

    I wonder if there might be some additional settings in the IIS configuration files? I’m sorry to say I don’t know very much in-depth detail about IIS configurations.

    If I run wordpress on IIS + PHP and can’t upload files more than 2Mb and then I run simple file upload php script on the same web server with IIS and this script work perfectly (I can upload files up to 10Mb), so this is not an IIS problem.

    PS: I was check few times IIS settings and it’s seem like all ok.

    I don’t doubt what you say. I believe you completely. I’m just saying that there is something more that needs to be done, which we are both overlooking. I don’t know if it matters or not (because like I said, I rarely ever use IIS, and have never used version 7.5) but are you already using the version of wordpress that is made for IIS server?

    [edit] This is an interesting thread. I don’t know if it will work for you or not, but someone says it worked for them on IIS7 and an older version of wordpress.


    1) WP for IIS –
    2) define('WP_MEMORY_LIMIT', '64M'); not help me and this was defined in php.ini memory_limit = 128M
    3) thanks for helping, but I was did search before posting and read few topics with similar problem but nothing help me. I don’t know how to explain, why php.ini upload file size limit don’t work in my case 🙁 I’ve also posted this problem on Microsoft IIS forum and there is no reply (people don’t know what to say.. but I know – never use IIS for WordPress :D)

    When running WordPress on IIS 7 you also have to change the max request size in web.config like so:

    <?xml version="1.0" encoding="UTF-8"?>
               <requestLimits maxAllowedContentLength="10000000" />

    The value is in bytes.

    I ran into this same issue and I was able to solve it by changing the limits in php.ini and web.config. The change in max size was reflected in the WordPress upload page. If the value in the upload page doesn’t change you might be editing the wrong php.ini (I had two instances of the file in two distinct PHP install directories).


    1. Upload a dummy file (pdf, jpg, mp4, whatever file type you want) using the WordPress Media uploader, just make sure this dummy file has the exact same name a the file that is bigger than your max upload size.

    2. Once the dummy file is successfully in the system, ftp to your uploads folder, find the subfolder containing the dummy, and transfer the real file with your ftp software, overwriting the existing dummy file.

    Viola!! I just did this with a 52MB pdf and it worked like a charm!


    It seems like a complicated method of doing things. Why can’t WordPress be written with the present media-rich generation in mind? 2MB files can be found even in most phone cameras!

    The 2MB limit is something that is usually defined by default in the PHP configuration files at the server level. It isn’t something that the WordPress software has any control over.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Max file upload’ is closed to new replies.