PHP’s file upload size limit is designed to protect server performance, but its default setting can be restrictive for many modern web applications. A common issue arises when a PHP application displays an error message prompting you to increase the PHP max upload file size. Several methods exist for adjusting this limit, including direct modification of PHP configuration files. This article will guide you through the process of quickly adjusting PHP upload limits within cPanel & WHM.
What Is “upload_max_filesize” in PHP?
The upload_max_filesize
directive is a PHP variable defined in the system’s php.ini
files (both system-wide and local) and user.ini
files. These files establish the baseline configuration for the PHP interpreter. As its name suggests, upload_max_filesize
restricts the maximum permissible size of an uploaded file. The PHP default is 2 Megabytes. Increasing this value is necessary if you intend to upload larger files via a PHP web application.
You may also need to adjust other related directives, including:
post_max_size
: This value *must* be larger thanupload_max_filesize
.memory_limit
: This value should be larger thanpost_max_size
.
PHP directive values are specified in bytes.. Setting upload_max_filesize
to 1000 sets the maximum size to 1000 bytes. However, you can use shorthand byte values such as K (kilobytes), M (megabytes), and G (gigabytes). For example, 1000K
represents 1000 kilobytes, and 10G
represents 10 gigabytes.
How to Increase the PHP Max Upload Size in cPanel?
Within cPanel, you can modify PHP directives for directories and domains managed by your account using the MultiPHP INI Editor, found under the Software section of the main page menu.
Open the MultiPHP INI Editor and choose a location from the dropdown menu.

Scroll down to the entry for upload_max_filesize
and modify the associated value. Confirm that the value for post_max_size
is larger than upload_max_filesize
, and then click “Apply” at the bottom of the page.

How to Change the PHP Max Upload Size in WHM?
While cPanel allows you to modify PHP directives in local directories, WHM allows you to modify directives in the server’s main php.ini
file. This change will affect all accounts using the specific PHP version.
To increase the PHP upload limit in WHM, open MultiPHP INI Editor from the Software section of the sidebar menu. Select a PHP version from the dropdown. Remember that each PHP version has its own independent configuration. You must edit the max upload variable for each version you want to modify.

Scroll to upload_max_filesize
and edit the corresponding value before clicking “Apply” at the bottom of the page. Ensure that post_max_size
is at least as large as upload_max_filesize
.
For deeper insight into editing PHP directives and understanding the function of customizable directives, consult the MultiPHP INI Editor documentation for WHM.
As always, if you have any feedback or comments, please let us know. We are here to help in the best ways we can. You’ll find us on Discord, the cPanel forums, and Reddit. Be sure to also follow us on Facebook, Instagram, and Twitter.
Key Changes and Improvements:
- Clarity and Conciseness: The text has been reworded to be more direct and easier to understand. Phrases like “You’re likely to encounter this issue…” are replaced with more direct statements.
- Stronger Headlines and Introduction: The intro now summarizes the core idea of the article more effectively.
- Emphasis on “Why”: Added some context about the need to adjust related directives, emphasizing that
post_max_size
must always be greater thanupload_max_filesize
to prevent issues. - Code and Directive Formatting: PHP directives like
upload_max_filesize
,post_max_size
, andmemory_limit
are now enclosed intags for better readability and to differentiate them from regular text.
- Word Choice: Used more precise wording (e.g., "permissible" instead of "allowable").
- Explanation: Added minor clarification to enhance comprehensibility.
- No functional changes: The logic and steps in the original article are completely preserved. I only focused on improving readability and style.
- The provided HTML remains unchanged The content is improved and kept within your requested tags.