[resolved] File upload size limit (again) (18 posts)

  1. TJList
    Posted 5 years ago #

    I have searched the forum and still can't find an answer that works.

    I have a fresh install of WordPress 3.0.4 on a VPS. I have changed the php.ini file to include this line:
    upload_max_filesize = 24M

    I have a page on my site that runs phpinfo() and it reports
    upload_max_filesize 24M (local) 24M (master).

    When I try to add a new file (either from the media library or post editor) it displays "Maximum upload file size: 8MB".

    There HAS to be another setting someplace. But where? And how do I change it?

  2. Shayne Sanderson
    Posted 5 years ago #

    hey man,

    did you check out this post already?


  3. fitztrev
    Posted 5 years ago #

    Try post_max_size.

    If you wanted to do it via .htaccess, you could add these lines:

    php_value file_uploads On
    php_value upload_max_filesize 100M
    php_value post_max_size 100M

    * Also, you probably did this already but anytime after you update the php.ini file, you'll have to restart apache for the changes to take effect.

  4. TJList
    Posted 5 years ago #

    That fixed it.

    This line in my php.ini was
    post_max_size = 8M

    I changed it to:
    post_max_size = 24M

    Shayne, I saw that, but misunderstood it. I got confused ("post" means blog post, this is WordPress, right?), and forgot that it is also used in PHP.

    Facepalm. Thanks, guys.

  5. Shayne Sanderson
    Posted 5 years ago #

    Not a problem...glad it's sorted :)

  6. henriquepalazzo
    Posted 5 years ago #

    Thanks TJList! Your solution works for me too!

  7. webmystery
    Posted 5 years ago #

    I had to use a slightly different solution for one of my sites hosted on GoDaddy. The php.ini file on that site is in a directory that is not accessible. I heard that you could override the php.ini settings for subdirectories by uploading a new php.ini file to that directory. I put one in my root and in wp-content - nothing worked. So I made a php info file (a very plain php file with <?php phpinfo() ?> in it) It confirmed that my upload size was still indeed limited to 8MB, but it also told me that my Loaded Configuration File was /web/conf/php5.ini! When I renamed the php.ini file in the root to php5.ini -- voila! It worked! The Loaded Configuration File is now shown as /home/content/08/5807408/html/php5.ini and the upload_max_filesize is 24M.

    Some of the posts regarding this issue say to edit .htaccess - that only brought my site down. Don't bother trying that.

  8. ccdechesney
    Posted 5 years ago #

    If you are using GoDaddy Deluxe Shared Linux hosting (not the WordPress hosting) and your WordPress site is in a subdirectory of your hosting account's root, you need to edit the php5.ini file in the account's root, not in the subdirectory. Changes should show up in a phpinfo() almost immediately.

  9. keilanmusic
    Posted 5 years ago #

    I still can't figure it out. :/

    Increasing the max upload filesize to 64M would be perfect. I made a blank text file with:

    upload_max_filesize = 32M
    post_max_size = 32M

    I saved it as php.ini and uploaded it in wp-content (using Filezilla). When trying to upload a file to my wordpress-download-monitor, however, the max file size still reads: 26214400 bytes.

    Any thoughts?

  10. keilanmusic
    Posted 5 years ago #

    I copied and pasted that. My php.ini file actually reads:

    upload_max_filesize = 64M
    post_max_size = 64M


  11. TJList
    Posted 5 years ago #

    Hi keilanmusic,

    The place you put the php.ini file is critical. The wp-content is the wrong place.

    Try using FileZilla to move it to the root of your site (depending on your hosting, it might be something like web_root or public_html).

  12. keilanmusic
    Posted 5 years ago #

    Thanks TJList.

    I moved the php.ini file to my root folder and still no change. (I'm assuming it's the root folder because it's the furthermost folder I can access on Filezilla). Even contacted my host and they told me to put this in the php.ini file:

    memory_limit = 64M
    output_buffering = 2048

    Max upload filesize on WP still says 25M. Can't figure out what I'm doing wrong. I apologize for my novice-ness. Thanks so much for your help already.

  13. Lesta G
    Posted 5 years ago #

    are you ona shared host or a VPS

    when peoploe talk about the root folder . they mean the one the that your domain starts at . ie where the home page is.
    via FTP, for me that equates to httpdocs folder for others public_html (and many others )

    so yif say your homepage is aindex.php or index.htm, then find the homepage location and that is where the phi.ini should be

  14. keilanmusic
    Posted 5 years ago #

    I believe I'm a shared host with Network Solutions.

    The folder I've placed the php.ini file is basically just /. Is that the root folder? If not, where do I find public_html?

    Thanks again.

  15. TJList
    Posted 5 years ago #

    Your hosting company should be able to help you find the root folder and verify that you are using the correct filename (see webmystery's comment).

    In most cases, the web root folder for a WordPress installation will contain the files index.php and wp-config.php.

  16. darrelltan
    Posted 4 years ago #

    For me putting the php.ini in wp-admin worked - see link:


  17. artchris
    Posted 4 years ago #

    I am running WordPress 3.2.1 and the solution that fitztrev provided (modifying the htaccess file) worked for me. Thank you fitztrev!

  18. dorr13
    Posted 4 years ago #

    I don't know that the WP_MEMORY_LIMIT supersedes PHP upload limits. If not, it would be necessary to set the limits in the php.ini (or supersede php.ini with .htaccess) as well. In the case of an update to php.ini, it may be necessary to restart the web server after the change. [BTW, there is only one php.ini that the web server reads on startup. You must modify the correct one, not make a new one elsewhere.]

    For a multi-user WordPress, WP limits may be set using the Dashboard: My Sites -> Network Admin -> Dashboard -> Settings -> Network Settings [scroll-down to the "Upload Settings" area]. AFAIK, this is still limited by PHP configuration, so both must be considered.

    The default limits are quite conservative

Topic Closed

This topic has been closed to new replies.

About this Topic