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.
| nginx | client_max_body_size |
| Apache | LimitRequestBody |
| PHP | upload_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
- Find out which web server you are on. nginx and Apache use different settings.
- Raise the server limit past the size of your file.
- Raise the PHP limits to match.
post_max_sizeneeds to be larger thanupload_max_filesize. - Restart the web server, or on shared hosting reload PHP from the control panel.
- 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.