Dekopon Stack One Click WordPress has a maximum upload file size of two gigabytes. This limit is quite generous and usually doesn't need modification. However, if you need to upload files larger than two GB, this tutorial explains how to change the upload file limit.
This guide assumes you have deployed a Dekopon Stack One-Click WordPress instance.
SSH to your instance.
Edit the Nginx HTTP site configuration.
$ sudo nano /etc/nginx/conf.d/wordpress_http.conf
Look for client_max_body_size
.
# set max upload size
client_max_body_size 2G;
Change client_max_body_size
to your desired limit. The abbreviation 2G
sets the limit to two gigabytes. You can also use K
for kilobytes or M
for megabytes.
Repeat these steps for the HTTPS site configuration.
$ sudo nano /etc/nginx/conf.d/wordpress_https.conf
Change client_max_body_size
to your desired limit.
Find your current PHP version in the WordPress dashboard under Tools > Site Health > Info > Server > PHP version.
Edit the configuration file /etc/php/YOUR_PHP_VERSION/fpm/pool.d/www.conf
. Replace YOUR_PHP_VERSION with the major version number. For example, if the dashboard shows PHP version 7.4.15
, your configuration files location is:
$ sudo nano /etc/php/7.4/fpm/pool.d/www.conf
Change these values to your desired limit. You may find them near the end of the file.
php_admin_value[post_max_size] = 2G
php_admin_value[upload_max_filesize] = 2G
Restart Nginx and PHP services to apply your changes. Replace 7.4
with your PHP version.
$ sudo systemctl restart nginx
$ sudo systemctl restart php7.4-fpm
Navigate to Tools > Site Health > Info > Media Handling in your WordPress Dashboard. Verify that the following items show your new file limit: