10-11-2026, 05:54 PM
Quick answer
In aaPanel, open App Store → Installed → the PHP version your website uses → Setting → Configuration. Review upload_max_filesize, post_max_size and memory_limit together. Save the change, reload that PHP service, then verify the values from the website itself. If the error is HTTP 413, also investigate the web server or proxy limit.
Before you start
1. Find the website's PHP version
Open Website and select your site's settings. Check its PHP version before returning to App Store. If the site uses PHP 8.4, change PHP-8.4 rather than PHP-8.5. Settings in a version's PHP manager can affect other websites using that runtime, so check those sites too.
2. Open the PHP configuration screen
Open App Store → Installed. Find the matching PHP row and click Setting. Choose Configuration in the left-hand menu.
![[Image: php-configuration-20261011.png?v=copyright1]](https://adminsforum.com/images/tutorials/php-configuration-20261011.png?v=copyright1)
AdminsForum lab: PHP 8.5 Configuration. The pictured values are the lab's current values, not a recommended configuration for every website.
3. Understand the three limits
4. Enter and save the values
In Configuration, edit the relevant text boxes. Keep the M suffix where a value is expressed in megabytes. Check that file_uploads is On if the application requires uploads. Click Save and read the resulting status message. Do not change unrelated settings while diagnosing one problem.
The separate Limit of upload screen offers one size field in MB:
![[Image: php-upload-limit-20261011.png?v=copyright1]](https://adminsforum.com/images/tutorials/php-upload-limit-20261011.png?v=copyright1)
AdminsForum lab: the Limit of upload shortcut currently shows 50 MB.
If you use that shortcut, return to Configuration afterward and inspect both upload_max_filesize and post_max_size. The Configuration screen makes the individual settings easier to review. Do not assume one shortcut also adjusts memory, application limits or Nginx.
5. Reload the selected PHP service
Choose Service in the same PHP manager and use Reload. Check that the service remains On. If the reload fails, inspect the PHP logs and correct the setting before repeatedly restarting services. Schedule changes carefully on a busy production server.
6. Verify what the website actually uses
First use the application's own server-information or upload-limit page if it has one. For WordPress, check Tools → Site Health → Info → Server, and then its media upload screen. The application's effective limit may be lower than the PHP setting.
If you need a small temporary diagnostic page, create a uniquely named PHP file inside the website's document root. Restrict access while testing. This prints only the relevant values rather than exposing a full phpinfo page:
Open it through the website's HTTPS URL, check the results, then remove the diagnostic file. Running php -i in a terminal is not a substitute for checking the website: the command-line runtime and PHP-FPM can use different configurations.
Now upload an ordinary test file below the intended limit using the real application's form. Confirm that it is stored and opens correctly. If larger uploads are needed, increase the test size gradually while watching memory and logs.
Troubleshooting
Undo the change
Restore the values you recorded, Save, Reload, and repeat the website-side check. If the application becomes unstable, restore first and investigate before increasing limits again.
Completion checklist
Reference: PHP manual: core configuration directives.
In aaPanel, open App Store → Installed → the PHP version your website uses → Setting → Configuration. Review upload_max_filesize, post_max_size and memory_limit together. Save the change, reload that PHP service, then verify the values from the website itself. If the error is HTTP 413, also investigate the web server or proxy limit.
Before you start
- Know which website you are changing and its assigned PHP version. Installing PHP 8.5 does not automatically switch every website to it.
- Record the existing values so you can undo the change.
- Choose a limit from your application's requirements and available server memory, rather than making everything unlimited.
1. Find the website's PHP version
Open Website and select your site's settings. Check its PHP version before returning to App Store. If the site uses PHP 8.4, change PHP-8.4 rather than PHP-8.5. Settings in a version's PHP manager can affect other websites using that runtime, so check those sites too.
2. Open the PHP configuration screen
Open App Store → Installed. Find the matching PHP row and click Setting. Choose Configuration in the left-hand menu.
![[Image: php-configuration-20261011.png?v=copyright1]](https://adminsforum.com/images/tutorials/php-configuration-20261011.png?v=copyright1)
AdminsForum lab: PHP 8.5 Configuration. The pictured values are the lab's current values, not a recommended configuration for every website.
3. Understand the three limits
- upload_max_filesize limits a single uploaded file.
- post_max_size limits the entire POST request, including files and other form data. Allow room beyond one file's limit, especially for multiple files.
- memory_limit limits memory used by a PHP script. Upload size and script memory are different: processing an image or import may require considerably more memory than the file size.
4. Enter and save the values
In Configuration, edit the relevant text boxes. Keep the M suffix where a value is expressed in megabytes. Check that file_uploads is On if the application requires uploads. Click Save and read the resulting status message. Do not change unrelated settings while diagnosing one problem.
The separate Limit of upload screen offers one size field in MB:
![[Image: php-upload-limit-20261011.png?v=copyright1]](https://adminsforum.com/images/tutorials/php-upload-limit-20261011.png?v=copyright1)
AdminsForum lab: the Limit of upload shortcut currently shows 50 MB.
If you use that shortcut, return to Configuration afterward and inspect both upload_max_filesize and post_max_size. The Configuration screen makes the individual settings easier to review. Do not assume one shortcut also adjusts memory, application limits or Nginx.
5. Reload the selected PHP service
Choose Service in the same PHP manager and use Reload. Check that the service remains On. If the reload fails, inspect the PHP logs and correct the setting before repeatedly restarting services. Schedule changes carefully on a busy production server.
6. Verify what the website actually uses
First use the application's own server-information or upload-limit page if it has one. For WordPress, check Tools → Site Health → Info → Server, and then its media upload screen. The application's effective limit may be lower than the PHP setting.
If you need a small temporary diagnostic page, create a uniquely named PHP file inside the website's document root. Restrict access while testing. This prints only the relevant values rather than exposing a full phpinfo page:
Code:
<?php
header('Content-Type: text/plain; charset=utf-8');
echo 'PHP version: ' . PHP_VERSION . PHP_EOL;
foreach (['upload_max_filesize', 'post_max_size', 'memory_limit'] as $key) {
echo $key . ': ' . ini_get($key) . PHP_EOL;
}Now upload an ordinary test file below the intended limit using the real application's form. Confirm that it is stored and opens correctly. If larger uploads are needed, increase the test size gradually while watching memory and logs.
Troubleshooting
- 413 Request Entity Too Large: inspect Nginx's client_max_body_size and any reverse proxy or CDN in front of the site. The request may be rejected before PHP runs. Review the active website configuration rather than adding duplicate directives blindly.
- Upload appears empty: compare the complete request size with post_max_size, and inspect the application's upload error handling.
- Allowed memory size exhausted: investigate the operation, extensions and application logs. Increase memory only when justified by the workload and available RAM.
- Old values still appear: recheck the site's PHP assignment, reload the correct service and investigate site-level overrides.
- Small files also fail: check free disk space, temporary upload storage, permissions and the application's allowed file types. A larger upload limit will not fix those issues.
- Timeout during an import: investigate application, PHP-FPM and web-server timeouts separately. Avoid treating every failure as a file-size problem.
Undo the change
Restore the values you recorded, Save, Reload, and repeat the website-side check. If the application becomes unstable, restore first and investigate before increasing limits again.
Completion checklist
- Correct website and PHP version selected.
- Original values recorded.
- Upload, POST and memory settings reviewed together.
- PHP reload succeeds and service is On.
- Website reports the intended effective values.
- Real application upload succeeds and temporary diagnostic file is removed.
Reference: PHP manual: core configuration directives.
