• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Can't increase PHP upload_max_filesize

stevland

Basic Pleskian
Server operating system version
CentOS Linux 7.9.2009 (Core)
Plesk version and microupdate number
Plesk Obsidian Version 18.0.47
I have tried absolutely every tip I have found.
upload_max_filesize shows at 16M in Plesk and in my phpinfo.php.

The default setting in Plesk is 2M!

I am frantically trying to upload a critical file to WordPress that is slightly over 16 MBs.

"The uploaded file exceeds the upload_max_filesize directive in php.ini"

I'm currently using PHP 8.1.12 / FPM application (although I've tried many different variations)

One thought: I have been running Plesk for perhaps 10 or 15 years. The fact that upload_max_filesize is set so low and refuses to budge makes me wonder if there is some old setting buried somewhere.
 

Oops, since I replied I realized I followed the instructions for nginx when there are different instructions for Apache.

I have subsequently added LimitRequestBody 2147483647 to /etc/apache2/apache2.conf{,.orig}

I have restarted httpd and psa and used # plesk repair web -domains-only for good measure.

Unfortunately I still do not see Maximum allowed HTTP request body size in Domains > mydomain > Hosting & DNS > Apache & nginx Settings
 
Things I've been trying:

# php -i | grep php.ini Configuration File (php.ini) Path => /opt/plesk/php/8.1/etc Loaded Configuration File => /var/www/vhosts/system/mydomain/etc/php.ini

I've edited both
/var/www/vhosts/system/mydomain/etc/php.ini (even though it's read-only) /opt/plesk/php/8.1/etc/phi.ini

---

Tools & Settings > PHP Settings > 8.1.12 FPM application > php.ini
post_max_size = 128M upload_max_filesize = 128M


---


I have added the following to /usr/local/psa/admin/conf/panel.ini

[php] settings.performance.upload_max_filesize[]=128M [webserver] nginxClientMaxBodySize = 128M


And then
# plesk repair web -domains-only

---


With each of these attempts I've been restarting Apache and Plesk (and logging out and back into Plesk) frequently.
# service httpd restart # service psa restart

(I've even restarted the server a couple of times in desperation)
 
I tried lots of other things that I didn't get around to documenting as well.

I don't know what ultimately worked. In fact, it still doesn't make sense to me at all.

But just now I went back to My Domain > PHP Settings

Although the maximum value for both post_max_size and upload_max_filesize in the dropdown list is 16M, when I clicked Reset to Default the value changed to 128M (Default)

So at least I can proceed with the work I need to do for today.upload_max_filesize.png
 
Actually, you don't have to go with any of the drop down values. You can type in whatever value you want.
 
Back
Top