WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Max file upload (12 posts)

  1. Ivaseg
    Member
    Posted 3 years ago #

    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.

  2. ClaytonJames
    Member
    Posted 3 years ago #

    Did you get a chance to try restarting IIS after you made the changes in php.ini?

  3. Ivaseg
    Member
    Posted 3 years ago #

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

  4. Ivaseg
    Member
    Posted 3 years ago #

    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

  5. ClaytonJames
    Member
    Posted 3 years ago #

    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.

  6. Ivaseg
    Member
    Posted 3 years ago #

    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.

  7. ClaytonJames
    Member
    Posted 3 years ago #

    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?

    http://wordpress.org/download/release-archive/

    [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.

    http://wordpress.org/support/topic/max-upload-size-problem-yes-again?replies=4

    More: http://wordpress.org/search/%22iis+7%22++upload+size?forums=1

  8. Ivaseg
    Member
    Posted 3 years ago #

    1) WP for IIS - http://wordpress.org/wordpress-3.1.2-IIS.zip
    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)

  9. stefann
    Member
    Posted 3 years ago #

    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"?>
    <configuration>
      <system.webServer>
        <security>
            <requestFiltering>
               <requestLimits maxAllowedContentLength="10000000" />
            </requestFiltering>
        </security>
      </system.webServer>
    </configuration>

    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).

  10. Meditation Man
    Member
    Posted 3 years ago #

    SUPER SIMPLE FIX:

    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!

    Peace!

  11. senseimichael
    Member
    Posted 2 years ago #

    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!

  12. ClaytonJames
    Member
    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic