Support » Fixing WordPress » Max upload file size

  • Resolved boggy_bg



    I cannot find the option for maximum file size limit.

    I am using normal (not MU) installation and last version of WP.

    Thank you in advance,


Viewing 11 replies - 1 through 11 (of 11 total)
  • I’m pretty sure the max upload size on a non-network WordPress install comes from php.ini, not WordPress.

    Are you getting an error when you try to upload a large file? If yes, what is the error?

    That’s generally set by your web host and quite a few limit to 8MB. You can ask them to increase that for you. You cannot set this in the wp-config.php file. You can try to override your server settings using php.ini, but the best route is to ask them to increase it for you to 16MB or even 32MB.

    In the file upload layer, one read “maximum file upload: 2 MB” and if I try to upload bigger file, the error message is: “this file is over the maximum allowed size” (sorry, my installation is Bulgarian and I translate back to English)

    "this file is over the maximum allowed size"

    – yep, php.ini. As @jonimueller said, it’s probably controlled by your host

    Thank you very much, that’s it!

    So, WordPress doesn’t pose any limitations in this respect?!

    You can hook into upload_size_limit

    Now, I changed php.ini (on my local server) to 200MB and nothing changed, then I tried the remote installation and nothing either.

    Seemingly it requires some hack, but I am a little newbie to WordPress to apply correct hack.

    @jjkovis: thank you for your support, but I lack of experience to apply the hack

    I forgot that you need to change post_max_size as well as upload_max_filesize

    Seemingly it requires some hack

    using hooks are not hacks as the make it so you don’t have to hack core WordPress files

    I tried both of them in my php.ini (local server: wamp x64, Win 7 x64) and nothing happened.

    Are you sure there is no option in WP to limit that?

    hmm…did you try restarting the server after changing the values?

    Are you sure there is no option in WP to limit that?

    – I’m pretty sure, here is the function the flash uploader uses to determine the max upload size:

    function wp_max_upload_size() {
          $u_bytes = wp_convert_hr_to_bytes( ini_get( 'upload_max_filesize' ) );
          $p_bytes = wp_convert_hr_to_bytes( ini_get( 'post_max_size' ) );
          $bytes = apply_filters( 'upload_size_limit', min($u_bytes, $p_bytes), $u_bytes, $p_bytes );
          return $bytes;

    I am really, really thankful!

    After the restart, everything goes well.

    I wish you all the success,


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