Posts Learn Categories Tags About
/
How to Increase PHP upload_max_filesize via Laravel Forge cover

How to Increase PHP upload_max_filesize via Laravel Forge

Learn how to increase the maximum upload file size on Laravel Forge

4 months ago

5 mins read

27 views

In this post, you will learn how to increase the maximum file/image upload size in Laravel applications especially when deployed through Laravel Forge.

Laravel Forge Server
In Laravel Forge admin panel, access the server details page where it contains all of the server settings and configuration.
Laravel Forge Server Detail

Laravel Forge PHP Settings
Once you are on that page, navigate over to the PHP menu on the sidebar and this is the page where you can configure the Max File Upload Size and also other PHP versions wherever necessary.
PHP Settings

On this page, enter the number of Megabytes you want the max file / image size you want the application to allow. Once you have updated it, do try to re-upload again and you will be able to upload the filesize that you have set.

Update php.ini
Another way to set the upload_max_filesize is to update the php.ini file directly. On the server details page, you can select the default PHP version that your project use and edit the "PHP FPM Configuration".
Laravel Forge PHP Versions

On this configuration file, scan through the file and search for upload_max_filesize and set it up manually. Do make sure to restart the PHP for it to take effect.
Edit PHP 7.4 FPM Configuraation on Laravel Forge