Updated: 15 November 2026 · Applies to: DirectAdmin with CloudLinux PHP Selector or PHP-FPM; PHP 8.3 and 8.4 tested

On a DirectAdmin account with CloudLinux, raise upload_max_filesize in Select PHP Version (the CloudLinux PHP Selector), on its Options tab, and raise post_max_size to the same value or a little more. upload_max_filesize is the largest single file PHP accepts; post_max_size is the largest whole form submission, so if it is smaller, big uploads still fail.

Method 1: CloudLinux PHP Selector

  1. Log in to DirectAdmin (usually https://your-server:2222; the address is in your welcome email).
  2. Open Select PHP Version, usually under Extra Features.
  3. Make sure a selector PHP version is chosen, not native. According to CloudLinux, the version used in PHP Selector should not be the native version for the selector settings to apply. See How to Change PHP Version Using CloudLinux Selector in DirectAdmin.
  4. Open the Options tab and set upload_max_filesize, for example 64M.
  5. Set post_max_size to at least the same value, for example 72M.
  6. Save or apply the change if your selector shows a button for it.

Values take the byte shortcuts K, M and G. CloudLinux's own guidance is that post_max_size should normally be larger than upload_max_filesize and smaller than memory_limit; to change the memory limit, see How to Adjust PHP Memory Limits in DirectAdmin Using CloudLinux Selector.

If upload_max_filesize is not in the list, your server admin has not allowed users to change it. According to CloudLinux, a setting is only editable when it is whitelisted in /etc/cl.selector/php.conf, so ask the admin to enable it or set the value for you.

Method 2: a .user.ini file (PHP-FPM, no CloudLinux)

According to DirectAdmin, PHP run as PHP-FPM or CGI reads a .user.ini file by default, because .htaccess cannot change PHP settings in that mode. Create the file in the folder of your site, for example domains/example.com/public_html/.user.ini, with File Manager or FTP:

upload_max_filesize = 64M
post_max_size = 72M

PHP caches .user.ini files: the default user_ini.cache_ttl is 300 seconds, so allow up to 5 minutes for the new values to show.

Method 3: server-wide or per domain (admin)

On your own VPS or dedicated server with PHP-FPM, DirectAdmin documents per-domain values in Admin Level, Custom Httpd Configuration, the domain, in the CUSTOM2 box of the PHP-FPM section, using this syntax:

php_value[upload_max_filesize] = 64M
php_value[post_max_size] = 72M

According to DirectAdmin, the method differs by PHP mode (check php1_mode in CustomBuild's options.conf), and PHP-FPM supports only one pool configuration per user, so its settings apply to the account's main domain.

Check that the new limit is live

Create a file such as check-limits.php in public_html:

<?php echo ini_get("upload_max_filesize"), " ", ini_get("post_max_size"), "\n";

Open it in your browser. In our test on PHP 8.3 (lab output) it showed the defaults before the change and the new values after:

2M 8M
64M 72M

Delete the file once you have checked, so it does not stay public.

Still failing at the same size?

  • Check that you edited the PHP version the site actually uses (selector version, not native).
  • Large uploads may also hit max_execution_time or max_input_time on slow connections.
  • The web server or a security rule can have its own request size limit, separate from PHP. Ask your server admin if the limit does not move.

Official documentation: DirectAdmin, PHP-FPM and CloudLinux, PHP Selector.

Related services

Server management

on-demand administration, hardening, migrations and monitoring.

KVM VPS hosting

NVMe SSD and full root access, with Free Basic Managed Support.

Was this answer helpful?

Still stuck? Open a ticket