Support » Networking WordPress » Increase Max File Upload Size

  • Resolved professorburns

    (@professorburns)


    Hello,
    I am attempting to increase the max file upload size to 10,000,000 KB on the multisite at my college.

    Here is what I have done thus far without getting the results I want:
    1. I have increased the max file upload size to 10,000,000 KB under “Network Settings.”
    2. I have placed a php.info text file in the root folder with the code
    <?php

    phpinfo();

    ?>
    I felt this should allow me to adjust the php.ini file, but inserting the php.info file does not allow me see my php.ini file when I go to courses.dc.edu/wp-admin/info.php

    I will be extremely appreciative of any help offered. I have spent 3+ hours attempting to address this issue but I have not gotten anywhere. Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator James Huff

    (@macmanx)

    phpinfo shows you want your PHP configuration is. It doesn’t allow you to change it or find your php.ini file. You’ll need to check your hosting provider’s documentation for that.

    Here are three ways you can increase the upload limit:

    1. If you can edit or override the system php.ini file, increase the maximum file and post sizes. For example, upload_max_filesize = 10000M ; and post_max_size = 10000M ;

    2. If you cannot edit or override the system php.ini file, add php_value upload_max_filesize 10000M and php_value post_max_size = 10000M to your .htaccess file.

    3. If neither of these work, it’s time to ask your hosting provider to increase the maximum file and post sizes on your account. Keep in mind that most decent hosting providers allow this, and If your hosting provider won’t accommodate you, perhaps it’s time to find a new hosting provider.

    (in the above examples, the limit is set to 10000MB which is 10000000KB)

    James,

    I cannot thank you enough!

    An outside consultant set up my college’s multipress site, then turned over the superadmin privileges to me. I have access to the entire server, but I still have not found the php.ini file — even at the time of this response.

    But with your clear instructions, I was able to locate the .htaccess file. I changed the values to what you indicated. Success! I now have a 10gb file upload size.

    I teach communication courses — I’m not an IT person, so thanks for breaking it down, so thanks for communicating clearly James. I’m grateful!

    Moderator James Huff

    (@macmanx)

    You’re welcome!

    @professorburns

    This comes a bit late, but it’s worth noting that having such a big upload size limit will enable users to upload (usually unnecessarily) huge files without any warning to the WordPress administrator.

    That would adversely affect backups and performance, could saturate your disk quota, and would most surely create accessibility problems.

    Setting the limit to 256 MB is a safer and also recommended value.

    Cheers.

    • This reply was modified 9 months, 1 week ago by  idearius.

    I found the php.ini file on my server in the root directory, and the suggested change worked instantly! 🙂

    However, a caveat: I originally assumed that the ini file would not be there, so I tried the .htaccess approach with very bad results. I tacked the two lines to the end of the file, and my site went down immediately. I started getting 500 errors indicating that the server was not accessible. Fortunately, I was able to FTP the original file back in place, and all was well. Then I looked for the ini file, which I found and fixed.

    The moral: Be sure you have a way to undo anything like this that you do before you do it, because the results can be unexpected and very, very serious. 🙂

    Thanks for the tip. It was the third time this week I ran into the file size limit, and I decided to just fix it once and for all, which with you help, I did.

    One added note: for the php.ini file to be re-read, you have to log out of WP-admin and back in. Until you do that, it will have no effect. 🙂

    Where is the php.ini that WordPress located on Ubuntu Server?

    Where is the php.ini that WordPress uses located on Ubuntu Server?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Increase Max File Upload Size’ is closed to new replies.