Overview
The following describes how to increase the PHP upload limit using the control panel or by editing a phprc file.
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 can adjust these values from the control panel or manually by editing a php.ini (phprc) file. See these articles to learn more about common PHP customizations.
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 in the panel
To increase the PHP upload limit from the panel:
- Navigate to the Manage Websites page.
- Click the Manage button to open Website settings, which allows you to modify various configurations for your site.
- Click the Settings tab.
-
In the Website Settings section, click Manage next to PHP.
The PHP Settings page opens. - Scroll down to the PHP Settings section.
- Next to General, click the Modify button.
-
Enter the desired values for post_max_size and upload_max_filesize.
To upload large files, post_max_size should be larger than upload_max_filesize.
- Click Save Changes.
If you need to set values higher than those available in the control panel, you can do so manually using a phprc file. See the section below.
Increasing the filesize upload limit manually with a phprc file
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.