Contents
  1. Error: 413 Request Entity Too Large
  2. Error: The Uploaded File Exceeds the upload_max_filesize Directive in php.ini

Error: 413 Request Entity Too Large

The issue is that nginx limits the upload size. The solution is as follows:

  1. Open the nginx configuration file nginx.conf, usually located at: /etc/nginx/nginx.conf.

  2. Add client_max_body_size 64m; to the http{} section. 64m is the maximum allowed upload size.

  3. Save the file and restart nginx with service nginx restart.

Error: The Uploaded File Exceeds the upload_max_filesize Directive in php.ini

Solution: Modify the following settings in /etc/php/7.3/apache2/php.ini:

post_max_size = 64M
upload_max_filesize = 64M

(Both settings are located fairly far down in the file and are not easy to find.)

Error: The Uploaded File Exceeds the upload_max_filesize Directive in php.ini