413 Request Entity Too Large

A 413 means what you tried to upload is bigger than the server will accept. The limit is a setting, and it can be raised.

Where the limit lives

There are usually two or three limits, and the smallest one wins.

nginxclient_max_body_size
ApacheLimitRequestBody
PHPupload_max_filesize and post_max_size

Raising the PHP limits alone will not fix it if nginx is still capping the request. Raise all of them.

What to do

  1. Find out which web server you are on. nginx and Apache use different settings.
  2. Raise the server limit past the size of your file.
  3. Raise the PHP limits to match. post_max_size needs to be larger than upload_max_filesize.
  4. Restart the web server, or on shared hosting reload PHP from the control panel.
  5. If you cannot change the settings, split the upload into smaller pieces, or move the file over SFTP instead.

On shared hosting you often cannot edit the server config directly. Most control panels expose the PHP limits, and support can usually raise the rest.

Defined in RFC 9110 as Content Too Large. See also MDN.