Cannot change upload_max_filesize or post_max_size in php.ini

Filename:

nginx/sites-available/default

Add:

location ~ \.php$ {
      fastcgi_param PHP_VALUE "upload_max_filesize = 50M \n post_max_size=51M";
}

Run: From command line: sudo service nginx restart


Try to do a command like this:

php --ini

It will show you which ini files are loaded by php.

Example output:

[admin@staging ~]$ php --ini
Configuration File (php.ini) Path: /usr/local/etc
Loaded Configuration File:         /usr/local/etc/php.ini
Scan for additional .ini files in: /usr/local/etc/php
Additional .ini files parsed:      /usr/local/etc/php/extensions.ini