In this post, you will learn how to increase the maximum file/image upload size in Laravel applications especially when deployed through Laravel Forge.
In Laravel Forge admin panel, access the server details page where it contains all of the server settings and configuration.
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.
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.
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".
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.
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 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.
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".
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.
Leave a reply