upload_max_filesize is the largest single file PHP accepts in an upload. /go/uploadmaxfilesize changes it for every installed PHP version at once. It: Every admin action in GoAdmio has a matching /go/ command, so anything you can click you can also script.
Quick start
# Allow uploads of up to 128 MB
/go/uploadmaxfilesize 128M
# Show the current value
/go/uploadmaxfilesize return
Arguments
| Argument | Required | Notes |
|---|---|---|
value |
No | A PHP size such as 64M, 128M, or 1G. Default: 64M. |
return |
No | Prints the current value instead of changing anything. Not case-sensitive. |
An argument that starts with -- is treated as "no value", so the default 64M is used.
Value rules
| Rule | Detail |
|---|---|
| Format | Use a plain number with a unit letter: K, M, or G. |
| Validation | None. Any text is written to the files, and PHP may ignore a value it cannot read. |
| Several words | Joined with spaces, so 128 M is written as 128 M, which is not valid. Write 128M. |
| Special characters | Avoid /, &, and \. They break the edit. |
Examples
# Read the current value
/go/uploadmaxfilesize return
# Set 128 MB
/go/uploadmaxfilesize 128M
# Set 1 GB
/go/uploadmaxfilesize 1G
# Set the default (64M)
/go/uploadmaxfilesize
# Apply the change now instead of waiting for the scheduled reload
/go/reload
# Check every php.ini on a Debian or Ubuntu server
grep -r "^upload_max_filesize" /etc/php /etc/php.ini 2>/dev/null
# Check what the command-line PHP uses
php -r 'echo ini_get("upload_max_filesize"), "\n";'
Output
| Situation | Output |
|---|---|
return |
The value from the first php.ini found, such as 64M. Empty if that file has no active line. The exit code is 1. |
| Value set | Upload Max Filesize updated successfully. |
| Unsupported operating system | Unknown operating system. |
The success message is printed even when no php.ini file was found.
See the full reference at /go/uploadmaxfilesize and the GoAdmio command index.
GoAdmio is free and open source, with no license fees and no account limits. Read the GoAdmio docs, or see why it is a free cPanel alternative at goadmio.com.
