Skip to content

Instantly share code, notes, and snippets.

@ultim8k
Last active January 31, 2019 14:37
Show Gist options
  • Save ultim8k/0afad48aeb22ba990e01674868de28a2 to your computer and use it in GitHub Desktop.
Save ultim8k/0afad48aeb22ba990e01674868de28a2 to your computer and use it in GitHub Desktop.
Increase file upload size limit in PHP-Nginx

Increase file upload size limit in PHP-Nginx

Source: Increase file upload size limit in PHP-Nginx

Changes in php.ini

vim /etc/php5/fpm/php.ini
# ...
upload_max_filesize = 100M
post_max_size = 100M
# ...

Change in Nginx config

http {
	#...
        client_max_body_size 100m;
	#...
}

Reload PHP-FPM & Nginx

service php5-fpm reload
service nginx reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment