Bluehost Web Hosting Help
Upload File Size Limit
PHP has, by default, a limit set to 10 MB (megabytes) for uploading through PHP scripts on our servers. If you need to have a higher limit you can usually just change that through the php.ini file. This article will step you through on how to increase the upload limits through php.ini.
You will need to have your PHP set in the cPanel to one of the Single php.ini options to be able to do this. FastCGI and the default will not work. To learn how to change the PHP option your account is using, go to PHP Version Selection (PHP Config).
This will not affect the phpMyAdmin in the cPanel, as that uses a different php.ini that is only accessable to the server administrators.
Editing upload_max_filesize and post_max_size
- Login to your Bluehost Control Panel.
- Open the File Manager and select to go to the Web Root and click Go.
- Then scroll in the right-hand panel to the file php.ini and right-click it.
- In the pop-up menu select Code Edit.
- Click Edit at the bottom of the pop-up for Character set selection.
- Use the keyboard shortcut to open the find pop-up window.
Windows and Linux: Ctrl + f
Mac: Command (⌘) + f
- In the Search text field type upload_max_filesize and press enter.
- This will highlight upload_max_filesize = 10M. Change 10M to the size you need.
- Open the find pop-up, again and in the Search text field now type post_max_size and press enter.
- Highlighted will be post_max_size = 10M. This will need to be changed to the same number as what was put in for upload_max_filesize.
- Click Save changes.
When the PHP engine is handling an incoming POST it needs to keep some of the incoming data in memory. This directive has any effect only if you have used the --enable-memory-limit option at configuration time. Setting too high a value can be very dangerous because if several uploads are being handled concurrently all available memory will be used up and other unrelated scripts that consume a lot of memory might affect the whole server as well.
max_execution_time and max_input_time
These settings define the maximum lifetime of the script and the time that the script should spend in accepting input. If several megabytes of data are being transfered max_input_time should be reasonably high. You can override the setting in the ini file for max_input_time by calling the set_time_limit() function in your scripts.
The apache web server has a LimitRequestBody configuration directive that restricts the size of all POST data regardless of the web scripting language in use. Some RPM installations sets limit request body to 512Kb. You will need to change this to a larger value or remove the entry altogether.
If you expect to handle a large number of concurrent file transfers on your website consider using a perl or java server side component. PHP happens to be our favorite web programming language as well but perl is just slightly ahead when it comes to file handling.
Most installations of perl as an apache module can accept up to 32 megabytes out of the box. Compare this against the 2MB default for PHP. The downside is that perl coding takes just a bit more effort than PHP but it's worth it.
Recommended Help Content
How to Increase the PHP Memory Limit
How to install the php.ini file and then increase the PHP Memory limit. (updated 1057 days ago)
Email Accounts - Change the Mailbox (Size) Quota
Where do I Change my Mailbox (Size) Quota? How do I Increase or Decrease Mailbox (Storage) Quota? (updated 532 days ago)
Cron Jobs with PHP and other File Types
This article will explain how to run php and other file types using Cron jobs. (updated 104 days ago)
Related Help Content
MySQL Database Reported Size and SQL Size Differ
An exported .sql file shows as a different size than the reported size in cPanel (updated 1361 days ago)
FrontPage File Upload Form
Why does the FrontPage 'file upload' component not work? (updated 153 days ago)
Email Attachment Size Limit
Can I send an email with large files/attachments? (updated 300 days ago)
Optimizing Your Images
How can I optimize my images? (updated 1975 days ago)
Wordpress Fatal error: Allowed memory size exhausted
Available PHP Memory Exhausted. (updated 1324 days ago)
Protecting the php.ini file from being viewed
The php.ini file can be viewed from a web browser. (updated 1018 days ago)
Mail List authentication failures (php/phplist)
I'm trying to configure an application (phpList) and it requires that I enter (in config.php) a username and password for a POP3 account to handle bounces. I keep getting a POP3 error and it can't log (updated 1987 days ago)
Specify a Cron Job to use a Specific php.ini File
Script executed with a cron job requires a specific php.ini file to be used. (updated 759 days ago)