Overview
The following describes how to use a phprc file to increase the PHP upload limit.
Background
Every installation of PHP comes with default settings, which are usually fine for most websites. Occasionally, the needs of a website make it necessary to adjust these PHP settings. For example, your site may need to upload files larger than the current PHP upload limit allows. In that case, you would need to create a php.ini (phprc) file, or access the existing phprc file, and update this value.
The DreamHost phprc file
The standard term for a PHP configuration file is php.ini. However, DreamHost uses the term phprc file instead. This acts the same way — only the name is different. In this article, only the term phprc is used.
Some variables (in particular, memory_limit, post_max_size, and upload_max_filesize) are subject to internal limitations; increasing them significantly beyond the default values will not work correctly and will cause issues with your site.
Increasing the filesize upload limit
The following shows you how to create a phprc file and then make adjustments to it:
Create a phprc file
View the following articles for instructions on how to create a phprc file:
If the file already exists, view the following articles for instructions on how to update it (depending on if you're using an FTP client or SSH):
Update the file
To increase that limit to 512MB, use the following directives:
upload_max_filesize = 600M post_max_size = 650M max_execution_time = 500 max_input_time = 500
To upload large files, post_max_size should be larger than upload_max_filesize.
Kill off all running php processes
Make sure to kill running php processes to ensure your new settings take effect.
Confirm your changes
After you've edited the file and killed off all PHP processes, you should check to confirm the values have updated. You can do this by creating a phpinfo.php file.
If you do not see your changes have updated, try killing off your PHP processes again.