If you’re reading this post chances are you were trying to upload an image/audio/video to Wordpress and received an error message from the browser uploader that looked something like: This file is too big. Your php.ini upload_max_filesize is 2M
Now, though this error is generated by Wordpress, it is actually pointing to a configuration setting on your server determined by your web host’s php.ini file. The php.ini file allows you to control an array of server settings, including maximum file upload size. Because Wordpress is a php-based system, some of its functions are controlled by php.ini .
Unfortunately, the method for resolving this predicament can vary, since it’s determined by your web host’s particular server configuration. So the first step is to contact your web host, or hop onto your host’s forums, to determine what your course of action may be.
In my case, SustainableWebsites.com support instructed me to create a custom php.ini file and place it in the directory in which the upload script was run. Step one easy enough. To increase upload size, just edit the line
upload_max_filesize = 2M
to your desired maximum like
upload_max_filesize = 100M
and done. Ok, but onto step two and I quickly realized I had no idea where the uploader script was located and where to put this file (the kind of question that’s beyond support’s domain). It took about a half hour of google and wordpress forum detective work before I came across this helpful thread, which subsequently led me to this clarifying post that told me to put the custom php.ini in the /wp-admin folder.
How do you like them apples php.ini ? (Yeah, just caught Good Will Hunting on Bravo the other night.)




5 Comments
Awesome. Thanks a bunch!
Wondering of you can help. The thread that you posted has been closed for further discussion.
I have a video file that I'd like to upload, and it's about 80mb. I followed instructions provided here and on other threads similar to the one that you posted, and now I get this message:
"This file is too big. Your php.ini upload_max_filesize is 100M"
Well, my file is less than 100M, so I don't understand what the problem is.
@TimKou – Did you check with your web host about the server configuration where your site lives? Also, as a general rule for big video files, i always prefer to use a distributor like youtube or vimeo so they handle all the dirty work. Then it's just a simple embed. Maybe that could be an option for you.
I'm having the same issue where it says, "This file is too big. Your php.ini upload_max_filesize is 100M"
I have contacted the hosting company and notified them of the issue. They made a couple changes to help me out but they didn't work. I noticed that some files, like mp3's will upload with not problem at all, then others will not. I checked their properties and some files which are over 128kbps will have an issue uploading and thought that may be the issue, but then others would upload. I took some of those files which were giving me problems and re-encoded them to a lesser KBPS and then it would upload fine.
I also uploaded the same file that was giving me issues on two other blogs on different blogs with different hosts and that same file uploaded just fine.
It's hard to narrow down what the actual issue is because I originally thought it was a file issue but then that file uploads to another blog without giving me the file size error. Then I thought it was a server issue but the server is allowing me to upload alternative files of the same properties and settings.
Anyone have any suggestions or ideas of something else I may want to try?
-dro
@dro:
I just discovered that you may need to also modify the line in your php.ini that looks like:
; Maximum size of POST data that PHP will accept.
post_max_size = 8M
Simply increase the post_max_size to the size of file you are uploading.