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:
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).
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 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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With