Increasing File Upload Limits (upload_max_filesize & post_max_size)
Sometimes a client may need to upload larger files to their website or hosting account — for example, when installing CMS themes, uploading backups, or importing data.
In such cases, you can increase the PHP upload limits directly from cPanel or using the PHP Manager feature.
🧭 Option 1: Using cPanel (Select PHP Version or PHP Manager)
-
Log in to the client’s cPanel.
-
Locate and click on “Select PHP Version” or “PHP Manager” (depending on the theme used).
-
Inside the PHP Selector, click on “Options” or “PHP Settings.”
-
Look for the following directives:
upload_max_filesize
post_max_size
(optional) memory_limit
(optional) max_execution_time
Click the current value and increase it (for example, from
8Mto128Mor higher, depending on the client’s need.
-
-
Once edited, the changes are applied automatically. No server restart is required.
🟢 Tip:
Make sure post_max_size is always equal to or greater than upload_max_filesize; uploads may still fail.



⚙️ Option 2: Editing via PHP.ini or .user.ini
If the PHP Manager option is not available, you can manually edit the PHP configuration file:
-
In cPanel → File Manager, go to the public_html directory (or the specific site folder).
-
Check if a file is named .user.ini or php.ini exists. If not, create one.
-
Add or update these lines:
-
Save the file.
-
If the website uses caching or a CMS (like WordPress), clear the cache and retest the upload.

🧩 Option 3: Using .htaccess (for Apache servers)
If the above methods don’t work, you can use .htaccess:
-
Open or create the
.htaccessfile inside the website root folder. -
Add the following lines:
-
Save changes and test the upload again.
⚠️ Note:
Some hosting environments may restrict these overrides.
If an error 500 appears after saving, remove the added lines — the server may not allow custom PHP values in .htaccess.
✅ Verification
After applying any of the methods above:
-
Create a simple PHP file called
phpinfo.phpinside the public_html folder: -
Access it from your browser (
https://domain.com/phpinfo.php) -
Check the current values for:
-
upload_max_filesize -
post_max_size -
memory_limit
-
If the values are updated, the configuration was applied successfully.
Finally, delete the phpinfo.php file for security reasons.
🔐 Support Best Practice
If the client requests this change:
-
Confirm whether the plan or hosting package supports custom PHP limits.
-
Apply the changes through their cPanel only (never directly via root SSH unless authorized).
-
Record the action in Admin Notes on the client’s WHMCS profile for tracking.