WordPress gotchas-php, etc. – Upload filesize

This response is for those who manage their own Linux server. If you do not, then your services’ admin would have to make the changes since you most likely would not have the authority. On a Linux box determine what php.ini file your php is using. Do this with a file called junk.php for example. It should look like:

<?
phpinfo() ;
?>

In your browser of choice enter:  http://www.yoursite.com/junk.php

This will output a lot if data if your php environment is functioning properly. Look for the following:

Configuration file path – your php.ini file
upload_max_filesize 2M

vi your php.ini file (noted in the above output) looking for “upload_max_filesize” and change it to what you think you need, i.e., 33M. Restart apache (service httpd restart) to pick up the new value. Look at “http://www.yoursite.com/junk.php” (may need to force a refresh) to see your new “upload_max_filesize” value. This should correct your 2M limitation.

I have seen a lot of posts where many have changed this value in their php.ini file and “nothing happens”. I am assuming that this is because the apache server (or whatever they are using) is not being restarted to acquire these new values.

Hope this helps.

4 comments on “WordPress gotchas-php, etc. – Upload filesize”

  1. Hayden Bennett Reply

    WordPress is the best blogging platform ever. It is much better than Typepad and blogspot.~.:

  2. Harley Marshall Reply

    i host 5 of my blogs on Blogspot and it is really good for beginners. but if you want something with more features, nothing beats wordpress;`’

  3. Gal Reply

    I can’t believe your tip still being so helpful for so many years after digging on the Net for few hours without much help… since too many different possibilities on how php reads the php.ini in many ways. I run my own Apache server @ home and at first this problem was taken care by placing the php.ini in the same folder as php binary located (ie /usr/local/bin) but somehow for some unknown reasons it didn’t take effect anymore…

    Anyway, great info! Thanks so much!

Leave A Reply

Your email address will not be published. Required fields are marked *

*

Bad Behavior has blocked 159 access attempts in the last 7 days.