Posts Learn Components Snippets Categories Tags Tools About

How to Increase PHP upload_max_filesize via Laravel Forge

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

3 years ago

5 mins read


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

Alternative Tags

If you like our tutorial, do make sure to support us by being our Patreon or buy us some coffee ☕️


PostSrc Code Snippets

Learn new snippets today, level up your Laravel, Alpine JS, Vue JS, Tailwind CSS skills and more.

Learn New Snippets

Sponsors 👑

+ Add Yours

PostSrc Code Components

Collection of Tailwind CSS components for everyone to use. Browse all of the components that are right for your project.

View Components