How do I increase upload-max-filesize or max-execution-time in .htaccess?
There are two ways to change limits in PHP.
If the default limits, for example for the upload size of a file, are too small, you can easily increase them yourself by creating a .htaccess file in the public_html folder containing the line(s) below. Replace the number of MB with the number you want.
Below are a few examples of how to change settings in the .htaccess file, but other parameters can be changed this way too.
php_value post_max_size 20M
php_value upload_max_filesize 20M
php_value max_execution_time 120
Alternative via the PHP version menu in DirectAdmin:
In DirectAdmin you can select the PHP version in the PHP version menu. By default it is set to native. In that case you cannot change any limits there and you use the .htaccess method, but if you have chosen a PHP version yourself, you can also change limits there. Choose 'Change PHP options' at the top right.
With the native PHP version you cannot change any options or limits. Use the .htaccess option instead.
Click Switch to PHP options to change the limits.
You can change the limits on this screen.
