WordPress Upload Blues: php.ini upload_max_filesize is 2M

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

This entry was written by ross, posted on February 8, 2009 at 3:34 pm, filed under Blog. Bookmark the permalink. Follow any comments here with the RSS feed for this post.

Timeline

9 Comments

Have your say

Add your comment below, or trackback from your own site. Subscribe to these comments.

:

: