How to change upload file size limit for File Manager in Plesk?

Started by mahesh, Jan 02, 2024, 06:14 AM

Previous topic - Next topic

mahesh

Question
How to change upload file size limit in Domains > example.com > File Manager?

How to check the maximum size of a file that can be uploaded in Plesk > Domains > example.com > File Manager?

Answer
Increase the default upload file size limit:
Plesk for Linux
1.Connect to the server via SSH

2.Open /usr/local/psa/admin/conf/php.ini in a file editor and set required values in bytes. The default value is 2147483647 bytes (=2GB). For example, the following will set the values to 21474836480 (20GB):

post_max_size = 21474836480
upload_max_filesize = 21474836480

3.Open /etc/sw-cp-server/config and set value client_max_body_size:

client_max_body_size 20000m;

4.Restart "psa" service:

#service psa restart
5.Log out from Plesk Interface and log into Plesk again to apply changes

6.Create a directory for custom templates:

#mkdir -p /usr/local/psa/admin/conf/templates/custom/server
7.Copy nginx default template to this directory:

#cp -a /usr/local/psa/admin/conf/templates/{default,custom}/server/nginxPleskAccess.php
8.Modify client_max_body_size like the following:

#grep client_max_body_size /usr/local/psa/admin/conf/templates/custom/server/nginxPleskAccess.php
client_max_body_size 20000m;

9.Reconfigure server template:

#plesk sbin httpdmng --reconfigure-server
These parameters are applied globally to all domains when if comes to uploading files through a Plesk interface in Domains > example.com > File Manager

Plesk for Windows
1.Connect to the server via RDP

2.Open file C:\Program Files (x86)\Plesk\admin\conf\php.ini in a file editor and set required values in bytes. The default value is 2147483647 bytes (=2GB). For example, the following will set the values to 21474836480 (20GB):

post_max_size = 21474836480
upload_max_filesize = 21474836480

3.Restart "Plesk Management Service"

Log out from Plesk UI and log in again to apply chang