Version 19 (modified by Daniel Kahn Gillmor, 5 years ago) (diff)

updated to point out the location of the custom php.ini file (#9692 should have been able to be self-resolved)

How do I increase my PHP file upload limit or change my php.ini settings?

When accessing via the web

You have full control over your PHP installation - you can change any php.ini setting that you would like. By default, your sites will use our global php.ini file (which is located in /etc/php5/cgi/php.ini).

If you would like to override any of those settings, you'll need to edit your site's custom php.ini file.

Finding your custom php.ini file

For members on shared hosting, the custom php.ini file for site from the example membership would be:


For members not using shared hosting, see below - you will need an admin to help you.

what you can change in php.ini

For example, if you want to increase the upload file limit size, you may want to add:

upload_max_filesize = 12M
post_max_size = 12M
max_execution_time = 300

Note: when increasing your upload_max_filesize, you should also:

  • increase your post_max_size (the maximum amount of the total size of posted data) and the max_execution_time (amount of time your script is allowed to execute - it might take a while to upload a large file)
  • And, if you are increasing the max file size above 8 MB, you will also need to change your fcgid settings in the control panel.

Optionally, you may also want to increase the amount of memory your php scripts can use with:

memory_limit = 64M

Another option is to turn off APC (only do this if you are experiencing segfaults in your error logs:


Once you have created this file you may need to reload your web settings to force the change to take affect. You can do that by logging into the Members control panel, choosing Web Configuration, click edit next to your web configuration, and then submit (without making changes).

IMPORTANT: Please use caution when changing these settings. Take note of the default setting and only change minimally as needed. We are operating on shared servers - so if you change your site to use more resources, you may have an adverse impact on the other members.

If you are using a VPS

Then you must open a support ticket and ask an admin to create a /etc/php5/conf.d/yoursite.ini file with these changes. For admins: please chown this file to the user so they can make changes without admin intervention.

When accessing via drush

If you are using drush, your custom php.ini file will not be used. To change settings, create a file called drushrc.php and place this file in your Drupal site's sites/default/ directory or your ~/.drush directory. You can add settings like:


To eliminate the auto update warning add this as well:

$options['self-update'] = FALSE;