• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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.
 
I registered an account to say that what helped me was updating /opt/plesk/php/7.3/etc/php.ini

For example:
Bash:
sudo nano /opt/plesk/php/7.3/etc/php.ini
sudo service php7.0-fpm restart
sudo service apache2 restart

I tried a whole bunch of the other things you suggested @stevland so maybe some of those were also needed.

PS: Yes, I'm still using an older version of PHP. I have to update to a newer version of Ubuntu soon. But I wanted to upload larger files (to Wordpress and the like) now.

Thank you
 
Back
Top