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:
-
Connect to the server via SSH
-
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 -
Open
/etc/sw-cp-server/config
and set valueclient_max_body_size
:client_max_body_size 20000m;
-
Restart "psa" service:
# service psa restart
-
Log out from Plesk Interface and log into Plesk again to apply changes
-
Create a directory for custom templates:
# mkdir -p /usr/local/psa/admin/conf/templates/custom/server
-
Copy nginx default template to this directory:
# cp -a /usr/local/psa/admin/conf/templates/{default,custom}/server/nginxPleskAccess.php
-
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; -
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
-
Connect to the server via RDP
-
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 -
Log out from Plesk UI and log in again to apply changes
Comments
3 comments
Hi,
My hosting provider has limit set to 2mb for upload_max_filesize. I do not have option to change it in 'Websites & Domains' -> 'PHP Settings'. I do not even have SSH.
Currently, I am requesting the hosting provider to increase it for domain. I am using WordPress for all my domains. I am provided Plesk control panel on Windows machine.
Is there any way I can use php.ini within my account or something else to increase limit for 'upload_max_filesize'?
Please advise.
None of the recommended options worked. I had to switch it by going to the PHP Settings in the Plesk Admin UI. See this video for reference:
https://www.youtube.com/watch?v=4yW1jiD7ucM
There are only two ways to do this one is by UI but must be done by the server administrator and is limited to 16M maximum and the other is via SSH as recommended in the post where, again, the administrator can increase the size further.
Please sign in to leave a comment.