WPCloud Deploy Documentation

Increase WordPress Upload Size

Straight out of the box, we’ve set the WP upload size to 25M.  But there are cases where you might need to increase that limit.

To do this, you’ll need to change two options – one in PHP and the other in NGINX.

Changing the PHP option is simple – you can do that right inside the WPCD dashboard:

  • Go to WPCloudDeploy -> Applications and click on site you’re working with.
  • Click on the PHP tab
  • Under the ADD OR UPDATE SOME COMMON PHP OPTIONS section, choose the UPLOAD_MAX_FILESIZE option.
  • Beneath that is a field where you’ll enter the value.  You can enter something like 50M.
  • Click the SET THE SELECTED OPTION button.

The next option you’ll need to change is the NGINX configuration.  You need to SSH into the server to do this:

  1. SSH into the server using your favorite ssh client.
  2. Once you’re in, use the NANO editor to open the /etc/nginx/sites-enabled/yourdomain.com file. (Replace ‘yourdomain’ with the actual name of your domain.)
  3. A few lines from the top you’ll see the client_max_body_size entry – change it from 25M to 50M (or whatever you need your new value to be).
  4. Save the file and then run the following command: service nginx restart.

After both these changes are completed, you should be able to upload larger files to WordPress.

See also: Fixing 413 Request Entity Too Large errors.

Share: