Categories
Admin

Changing Max File Upload Size

I ran into a problem while uploading an image earlier. Bascially I bumped into the default upload size limit of 2M for PHP. My host provider is Hostmonster so I set about figuring out how to change it. It turned out to be fairly straightforward in the end.

First, if there are no php.ini files installed, you need one. Luckily, the CPanel provides a way to install a default php.ini to the public_html folder with the “PHP-Admin” icon in the “Advanced” section. From there it can be downloaded, modified and put back. I did all my mods using FTP.

The 2 most pertinent settings turn out to be “upload_max_filesize” and “post_max_size.” After changing these settings as appropriate, the file needs to be installed in the folder on the server where the script that handles the file upload resides. So, for instance, for a WordPress install, put the file in the “wp-admin” folder.

I don’t know if this will work for other hosting providers. It appears to depend on how PHP is configured to run on the host.

Leave a Reply

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