How to Change the Maximum Upload Size for Vultr's One-Click WordPress
Introduction
Vultr's 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.
Prerequisites
This guide assumes you have deployed a Vultr One-Click WordPress instance.
1. Configure Nginx
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 abbreviation2G
sets the limit to two gigabytes. You can also useK
for kilobytes orM
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.
2. Configure PHP
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 version7.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
3. Restart Services
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
Verify the New Upload Limit
Navigate to Tools > Site Health > Info > Media Handling in your WordPress Dashboard. Verify that the following items show your new file limit:
- Max size of post data allowed
- Max size of an uploaded file
- Max effective file size