PHP Configuration
Go to the php.ini config file
nano /etc/php-fpm.d/www.conf
Modify (or add) these lines into the config file
php_admin_value[memory_limit] = 512M
php_admin_value[upload_max_filesize] = 512M
php_admin_value[post_max_size] = 512M
Nginx Configuration
Go to the global Nginx config
nano /etc/nginx/nginx.conf
Add this line into http{}
section
http {
...
client_max_body_size 512M;
...
Then restart both of them
systemctl restart nginx
systemctl restart php-fpm
Credit to
https://docs.bitnami.com/aws/infrastructure/nginx/administration/increase-upload-limit-php