uploads – 413 Request Entity Too Large nginx/1.18.0 (Ubuntu)


This message occurs whenever I attempt to upload a file greater than 2M in wordpress. I have made the follow changes in order to increase the allowed file upload sizes:

In nginx.conf, I added

client_max_body_size 200M;

In php.ini, I modified

upload_max_filesize = 200M
max_file_uploads = 20
Post_max_size = 256M

In wp-config.php, I added

@ini_set( 'upload_max_filesize' , '200M' );
@ini_set( 'post_max_size' , '256M' );
@ini_set( 'memory_limit' , 256M' );

Even with these parameters set in the three configuration files I am still getting the message
413 Request Entity Too Large nginx/1.18.0 (Ubuntu)

Can anyone help?