How to change the maximum upload size? Print

  • 34

To modify a parameter of your PHP configuration you have two possibilities depending on your configuration. To determine the method to use you must connect to your Control Panel:

  1. In the"SOFTWARE" tab, click on the"Select a PHP version" icon;
  2. Once in the"PHP Selector", you will see the version and mode currently activated under"Current PHP version" :
    • If you have a"native (X.Y)" version, which is the default configuration if you did not change this setting voluntarily, you will have to use a .htaccess file;
    • If you have selected another version (non-native), you can also use the"PHP Selector" interface of your control panel to be able to modify the PHP configuration of all your hosted sites at the same time.

For more detailed information about the impact of each configuration method, we invite you to read this other topic on this subject: How to change the PHP configuration?

.htaccess file

To change a PHP setting via an .htaccess file, you need to create a file named .htaccess in the root folder of your site or wherever the relevant scripts are located.

This file must contain a line with the parameter you want to modify, in this case :

php_value upload_max_filesize 512M

By default it is set to the size of 512 MB, but you can choose the value that suits you. If you specify a number without letters, its value will be measured in bytes. You can use the abbreviation letters (shorthand notation) for better readability: K for kilobytes, M for megabytes and G for gigabytes.

Selected version (non-native)

If you have selected a version other than the native one, you can use the interface provided in your control panel to change your setting, which will be valid for all your sites hosted in your account (unless the setting is defined in a .htaccess file). To do this, once you are logged into your :

  1. In the"SOFTWARE" tab, click on the"Select a PHP version" icon;
  2. Once in the"PHP Selector", right click on"Switch To PHP Options" and you will see the list of modifiable parameters;
  3. Click on the value of the"upload_max_filesize" parameter and select the new value that suits you best;
  4. Click on the "Apply" button that appears to the right of the value to validate your choice;
  5. Don't forget to click on"Save" at the bottom of the list so that your new configuration is applied.

Was this answer helpful?