Adjusting the Upload File Size Limit for the File Manager in Plesk
Introduction
The File Manager built into Plesk has a default size limit for uploadable files. This limit is set to 2 GB by default. To upload larger files via the File Manager, you’ll need to make some adjustments in Plesk. In this article, you’ll learn how to adjust the size limit for uploadable files.
Prerequisites
- Unmanaged server with Plesk Control Panel
If you’d like to increase the upload file size limit on your managed server, please contact our support team so we can make the necessary adjustments. See also: Contact Us
Adjust PHP Settings
You can configure the maximum file size and the maximum request size using the PHP configuration variables upload_max_filesize and post_max_size. Open the file /usr/local/psa/admin/conf/php.ini with a text editor of your choice and adjust the variables as desired. Be sure to specify the values in bytes.
Example (adjusting to 20GB):
nano /usr/local/psa/admin/conf/php.ini post_max_size = 21474836480
upload_max_filesize = 21474836480 Adjusting the Plesk Panel Web Server Configuration
The client_max_body_size configuration variable of the Plesk-specific web server determines the maximum allowed size of a client’s request body. Open the file /etc/sw-cp-server/config with a text editor of your choice and adjust the variable as desired.
Example:
nano /etc/sw-cp-server/config worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"'
"'$fastcgi_script_name' '$fastcgi_path_info' '$document_root'";
sendfile on;
reset_timedout_connection on;
#keepalive_timeout 0;
keepalive_timeout 65;
#tcp_nodelay on;
#gzip on;
#gzip_disable "MSIE [1-6]\.(?!.*SV1)";
server_tokens off;
fastcgi_max_temp_file_size 0;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
fastcgi_pass_header X-Accel-Buffering;
client_max_body_size 2048m; <----------------------------------- Make adjustments here
error_page 497 https://$hostname:$server_port$request_uri;
include /etc/sw-cp-server/conf.d/*.conf;
} Restart the Plesk Panel Web Server
To apply your changes, the Plesk-specific web server must be restarted. To do this, run the command systemctl restart psa. Then log out of the Plesk interface and log back in so that the changes take effect. Afterward, you will be able to successfully upload files larger than the predefined limit.