Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Increase upload_max_filesize via Forge

Error: 413 Request Entity Too Large

I have attempted to increase upload_max_filesize to 20M using the Edit PHP FPM Configuration and Edit PHP CLI Configuration tools in Laravel Forge. It successfully saves my settings, but the changes don't seem to take affect. I have tried restarting nginx and the server.

Environment:

  • AWS EC2
  • nginx
like image 591
Donnie Avatar asked Apr 12 '16 19:04

Donnie


People also ask

What is the maximum upload_max_filesize?

The default PHP values are 2 MB for upload_max_filesize, and 8 MB for post_max_size. Depending on your host, changing these two PHP variables can be done in a number of places with the most likely being php. ini or . htaccess (depending on your hosting situation).

How do I increase my server upload limit?

Open the file in any text editor and add the following code. @ini_set( 'upload_max_size' , '20M' ); @ini_set( 'post_max_size', '13M'); @ini_set( 'memory_limit', '15M' ); Save your changes, and it should increase your file upload size.

How do I increase upload size in WordPress multisite?

How to increase the WordPress Multisite Network limit for Maximum Filesize Upload? To increase that limit, go to your WordPress admin area > My Sites > Network Admin > Settings. Scroll down to the Max upload file size and set the preferred value.


1 Answers

Updating since this is the first search engine result for a search on this topic:

Forge now has a built-in setting you can update by going to the server details page and then clicking on PHP from the menu on the left. You'll see a form to change the max file size.

like image 131
Dave Alvarez Avatar answered Sep 19 '22 16:09

Dave Alvarez