Affiliate Disclosure: Some links on this page are affiliate links. If you purchase through our links, we may earn a commission at no extra cost to you.
Last updated: December 5, 2026 · Reading time: about 11 minutes
WordPress 413 Request Entity Too Large means the file you are uploading is bigger than a limit set by your web server or by PHP, so the request never reaches WordPress. To fix it, raise that limit: client_max_body_size in nginx, LimitRequestBody or FcgidMaxRequestLen in Apache, and upload_max_filesize with post_max_size in PHP, then restart the server.

Key takeaways
- A 413 is a size limit, not a WordPress bug. Nothing in wp-admin can lift a limit that the server enforces first.
- Four layers can block an upload: a proxy or CDN in front of the site, the web server, PHP, and WordPress itself.
- The smallest limit wins. Raising PHP alone often changes nothing because nginx or Apache rejects the request before PHP sees it.
- Media library files, theme zips and plugin zips all pass through the same limits.
- After any edit, reload nginx or restart PHP-FPM. Without that, the old value stays in memory.

What does the WordPress 413 error mean?
HTTP status 413 is the server saying the request body is too large. The upload is refused at the door, so WordPress never writes a line to its own logs and no plugin can intercept it. That is why a 413 looks mysterious: the media library simply fails, or the theme uploader stops at 100% with no useful message.
The nginx log entry usually reads client intended to send too large body. Apache returns Request Entity Too Large, and some hosts phrase it as the uploaded file exceeds the upload_max_filesize directive when the limit is PHP’s instead of the server’s. Those two messages point at different fixes, so read the one you get before changing anything.
The table below shows where each limit lives. Values are the common defaults; your host may set something else.

WordPress 413 request entity too large: which limit is blocking you?
Compare the file size with each limit in turn, starting at the outside of the stack. A five minute check saves you from editing the wrong file.
- Note the exact file size. A 40 MB theme zip and a 3 MB image fail for different reasons.
- Check PHP limits in wp-admin. Go to Tools → Site Health → Info → Server. You will see upload_max_filesize, post_max_size and memory_limit.
- Try a small file. If a 500 KB image uploads and a 4 MB one fails, the cap sits between the two and PHP is the likely layer.
- Check the web server. On nginx look for client_max_body_size in the site config; on Apache look for LimitRequestBody and FcgidMaxRequestLen.
- Check anything in front. A CDN, a load balancer or a host control panel proxy can cap request bodies without telling you.



How to fix the 413 error in nginx
Add or raise client_max_body_size in the server block for your site, test the config and reload nginx. The value is a size: 64m means 64 megabytes.
- Open the site’s config, usually /etc/nginx/sites-available/your-site or a file under /etc/nginx/conf.d/.
- Inside the server block, add client_max_body_size 64m;. Put it in the http block only if you want the value for every site.
- Run nginx -t to confirm the syntax, then systemctl reload nginx.
- Upload the same file again from the media library.
The nginx manual documents client_max_body_size in the ngx_http_core_module page, and it notes that the default is 1 megabyte. That default is why a fresh nginx install rejects almost every theme zip.
How to fix the 413 error in Apache
Set LimitRequestBody in bytes, and if PHP runs through mod_fcgid, raise FcgidMaxRequestLen as well. Apache itself often has no body limit, so the block usually comes from one of these two directives or from mod_security.
- LimitRequestBody 67108864 in .htaccess allows 64 MB for that directory. Zero means no limit, which is not a good idea on a public server.
- FcgidMaxRequestLen defaults to about 1 MB in many packages and is a common hidden cause on shared hosts.
- SecRequestBodyLimit in mod_security can reject large POSTs even when the other two are generous.
- Remember that php_value lines in .htaccess work only with mod_php. On PHP-FPM they cause a 500 error instead of raising anything.
How to raise PHP’s upload limits
Increase upload_max_filesize and post_max_size together, and keep post_max_size at least as large as the biggest file you plan to upload. A 64 MB file with a 32 MB post_max_size still fails.
You can edit these in php.ini, in a .user.ini file in the WordPress root on PHP-FPM setups, or through your host’s PHP settings page. Typical values for a site that uploads video or large plugin zips are upload_max_filesize 128M, post_max_size 128M, memory_limit 256M and max_execution_time 300.

If you edit php.ini directly, confirm you changed the file PHP actually loads. Site Health shows the loaded configuration file, and a phpinfo page does the same. Servers with several PHP versions installed often have one php.ini per version, and it is easy to edit the wrong one.
How to increase the WordPress upload limit without server access
Ask your host first, then use the host’s own PHP settings screen, then a .user.ini file. Shared hosting usually hides the server config, and support can raise the limit in minutes.
- Open your control panel and look for PHP options, Select PHP Version, or MultiPHP INI Editor. Most hosts expose upload_max_filesize and post_max_size there.
- If the panel has no such screen, create a .user.ini file in the WordPress root with the two values and wait a few minutes for PHP to pick it up.
- Plugins that promise to raise the upload limit usually write that same .user.ini or .htaccess entry. They cannot go past the server’s own cap, so if the host blocks large bodies they will not help.
- On multisite, the Network Settings upload limit is a WordPress value and it is still capped by PHP. Raising it there alone does nothing.
Why is the 413 error still there after the change?
Something is still enforcing the old value: an unloaded config, a second PHP version, a proxy, or a cached error page. Work through these before you change numbers again.
- The server was not reloaded, so the old limit is still in memory.
- You edited a php.ini that PHP does not load, or a site config nginx does not include.
- A CDN or load balancer in front of the site has its own body limit.
- .htaccess is ignored because AllowOverride is off, so your LimitRequestBody never applied.
- The 413 comes from a different vhost, for example when www and non-www are served by separate config files.
How to upload a large file when you cannot change the limit
Move the file in by another route: the host’s file manager, SFTP, WP-CLI, or a plugin that uploads in chunks. For a theme or plugin, you can also unzip locally and upload the folder over SFTP, which avoids the uploader entirely.
- Host file manager or SFTP: upload to wp-content/themes or wp-content/plugins, then activate.
- WP-CLI: wp plugin install and wp theme install fetch from wordpress.org without touching PHP upload limits.
- Chunked upload plugins split a large file into pieces small enough to pass, then join them on the server.
- For media, consider hosting large video elsewhere and embedding it, rather than pushing hundreds of megabytes through PHP.
Before you make server changes, take a backup. Our guide on how to back up a WordPress site covers the files and the database, and the checklist in WordPress security basics is worth a read if you are editing config files for the first time.
Frequently asked questions
Is a 413 error caused by WordPress or by the server?
By the server or PHP, almost always. WordPress only reports it as a failed upload, because the request is rejected before WordPress handles the file.
Does raising memory_limit fix a 413 error?
No. Memory is about how much RAM a script uses; 413 is about how many bytes the request may carry. The setting you want is client_max_body_size, LimitRequestBody or post_max_size.
Why does my theme upload fail at 100%?
The file reached the server and was rejected while PHP or the web server read the body. That is the classic 413 or FcgidMaxRequestLen case, and the browser shows a vague failure instead of the status code.
Can I fix a 413 error from .htaccess?
Sometimes. LimitRequestBody works if the host allows .htaccess overrides. PHP values in .htaccess only work with mod_php, and on PHP-FPM they break the site.
What upload size should I set?
Set the limit just above the largest file you actually need, for example 64 MB for plugin zips or 128 MB for video. A very high limit makes it easier for an attacker to send huge requests.
What is the difference between a 413 and a 504 error?
A 413 is refused at the start because of size. A 504 means the request was accepted but the server took too long to answer. Our guide to WordPress 504 gateway timeout covers the second case.
Does a 413 error hurt SEO?
Not directly, because search engines do not upload files to your site. It only hurts when it stops you publishing, or when the same misconfigured proxy also breaks other requests.
Sources and further reading
- nginx documentation: ngx_http_core_module, client_max_body_size.
- PHP manual: core php.ini directives, including upload_max_filesize and post_max_size.
- WordPress developer handbook: Debugging in WordPress.
Summary
A 413 Request Entity Too Large in WordPress is a body size limit, and the fix is to find the layer enforcing it and raise that value. Check PHP in Site Health first, then nginx’s client_max_body_size or Apache’s LimitRequestBody and FcgidMaxRequestLen, keep post_max_size above upload_max_filesize, and reload the server. If you cannot touch the config, ask your host or move the file in over SFTP. Related errors in the same family are covered in WordPress memory exhausted error and WordPress missing a temporary folder.