TRLet’s talk
← Argo Ajans

WordPress

How to fix the WordPress 413 Request Entity Too Large error

Ramazan Göksu ·

How to fix the WordPress 413 Request Entity Too Large error

Short answer

A WordPress 413 Request Entity Too Large error means the file you’re uploading, a plugin, theme package, media file, or import file, is bigger than the limit your server accepts for a single request. This isn’t a WordPress bug; the request gets rejected by the web server (Nginx or Apache).

Or by PHP before it ever reaches WordPress’s own code.

The fix comes down to one of two paths: get the file onto the server without hitting PHP’s upload limit at all (FTP), or permanently raise upload_max_filesize, post_max_size, and, if you’re on Nginx, client_max_body_size on the server. The sections below walk through which one fits your situation.

Why does WordPress show a 413 Request Entity Too Large error?

The “413 Request Entity Too Large” message you see in the browser is a standard HTTP status code, not something specific to WordPress. It triggers when the amount of data in your request, usually a file, exceeds a limit defined by the server or PHP. It shows up most often when:

  • Uploading a large theme or plugin ZIP file from the dashboard
  • Adding a high-resolution image, video, or audio file to the media library
  • Importing a large .sql or .xml file through a backup or migration plugin
  • Uploading a bulk product import file in a plugin like WooCommerce

What these have in common is that the file’s size exceeds a limit set by the server, or by a firewall or CDN sitting in front of it. WordPress’s core code never even sees the request, which is why debugging plugins or themes won’t fix this one.

How is a 413 error different from other WordPress upload errors?

WordPress can show a few different error messages during file uploads, and mixing them up wastes time. A 413 error is specifically about the total size of the request, and it gets rejected the moment the request reaches the server, before PHP even starts processing the file. By contrast, the vague “HTTP error” that shows up in the media library usually happens after the file reaches the server, during image processing (the Imagick or GD library) or because of a memory shortage. We cover that error in detail in our guide to the HTTP error when uploading images. The practical way to tell them apart: a 413 error is instant and triggers at the same threshold every time, while an “HTTP error” is less predictable and varies by file.

Upload the file directly through FTP

The fastest fix skips the dashboard entirely. Extract a plugin or theme ZIP file on your own computer first, then upload it with an FTP client (FileZilla, for example) straight into the right folder (wp-content/plugins/ or wp-content/themes/). You can do the same for media files, uploading into the right year/month subfolder under wp-content/uploads/. But a file uploaded this way still needs to be registered in WordPress’s database to show up in the media library. FTP is really only a workaround for media; the permanent fix for media uploads is still raising the PHP limits below.

Raise the PHP upload limits

Your hosting panel (cPanel, Plesk, or a custom panel) usually has a “PHP Settings” or “MultiPHP INI Editor” section. Raise these two values together:

  • upload_max_filesize: the largest size allowed for a single file
  • post_max_size: this needs to be equal to or larger than upload_max_filesize, otherwise the overall request still exceeds its limit even when the file itself is under its own cap, and the error persists

Both of these settings, and their default values, are documented directly in PHP’s own official configuration file (php.ini-production): the default post_max_size is 8M and upload_max_filesize is 2M, which is already too small on most shared hosting accounts for a large theme package or backup file. A value in the 32-64 MB range covers most business needs without raising it so high that it puts unnecessary load on server resources.

If your panel doesn’t expose this option, contact your hosting provider and ask them to raise both values permanently for your account; on shared hosting, these settings are usually locked on the provider’s side.

Trying .htaccess or wp-config.php (and why it’s not the first move)

Some guides suggest adding php_value upload_max_filesize lines to .htaccess, or ini_set() calls to wp-config.php. These can work on Apache-based servers running suPHP or mod_php, but on PHP-FPM, which most modern hosting environments use, these settings are usually ignored entirely and have no effect. A bad edit to .htaccess can also take your whole site down with a 500 error. Try your hosting panel’s official PHP settings first, and only reach for this method as a second option if the panel doesn’t offer one, backing up the file before you touch it.

If you’re on Nginx: client_max_body_size

If your server runs Nginx, which most modern managed WordPress hosting does, a 413 error can come from Nginx’s own client_max_body_size directive, completely independent of PHP’s upload limits. This directive sets the upper bound Nginx itself accepts for a request body, and its default is often fairly low, around 1 MB. If you’ve already raised the PHP limits and the error persists, this value likely needs raising too. On shared hosting, only your provider can change it, so naming this specific directive in your support ticket speeds things up.

Check your CDN or firewall

If your site sits behind Cloudflare or a similar CDN or firewall, that layer can enforce its own request-size limit and reproduce the error even after your server settings are correctly configured. If you’re still getting a 413 error on a large upload after confirming every server-side limit is correct, switch your CDN to “development mode” temporarily and test the upload directly against the server. If the error disappears, the cause sits in the CDN’s own configuration.

What to watch for with WooCommerce and bulk imports

For ecommerce sites, a 413 error is a common roadblock, because product import files (CSV/XML) or full database backups are usually much larger than a single media file. In that case, splitting the file into smaller batches before import, or running the operation through WP-CLI from the command line (which isn’t subject to the web server’s request-size limit), is a practical workaround. As our guide to the WordPress 502 Bad Gateway error also shows in a broader context, large data operations tend to hit several server limits at once.

What if nothing works?

If you’ve worked through the steps above in order and the error is still there, there’s likely a limit at the server level, Nginx configuration or an intermediate security layer, that you can’t change from your own panel. Share the exact error, the size of the file you’re trying to upload, and the steps you’ve already tried with your hosting support team; this error is mostly resolved in server configuration files you don’t have access to.

Avoiding the WordPress 413 error next time

Most of this is preventable with a little planning ahead. Set your hosting panel’s PHP upload limits to a value that actually matches your site’s needs, large plugin packages, regular backup files, as a permanent setting rather than a one-off fix. Compress media files before uploading them, and if you regularly move large amounts of data, lean on command-line tools like WP-CLI instead. To prevent other server errors tied to resource limits, our guide to the allowed memory size error is worth a look too. Most large file operations push against a size limit and a memory limit at the same time.

Next step

A WordPress 413 Request Entity Too Large error is a configuration issue tied to your server’s upload limits, not a WordPress bug, and it carries no risk of data loss. If you want a broader review of your hosting setup or server configuration, our group company Web Tasarım Ofisi supports WordPress maintenance and server performance work.

To talk through your site’s technical setup or a custom software need, take a look at our custom software service or get in touch with Argo Ajans.

Frequently asked questions

What does a WordPress 413 Request Entity Too Large error mean?

It means the file you're trying to upload, a plugin, theme, media file, or import file, is larger than the limit your server accepts for a single request. The error comes from the web server (Nginx, Apache) or PHP itself, not from WordPress.

Is the 413 error a WordPress bug?

No. WordPress never gets to process this request at all, it's rejected at the server or PHP level before it reaches WordPress's code. That's why deactivating plugins or switching themes won't fix it, the fix always lives in server or PHP configuration.

Which PHP settings cause a 413 error?

Two settings matter most: upload_max_filesize, the largest size allowed for a single file, and post_max_size, which needs to be at least as large as upload_max_filesize, or the error persists even for files under the upload limit.

Is there a quick fix besides shrinking the file?

Yes. Uploading the file directly through FTP or your hosting panel's file manager, straight into wp-content/uploads or wp-content/plugins, bypasses PHP's upload limit entirely. It's a practical workaround for a large plugin or theme package.

How do I avoid this error in the future?

Set your hosting panel's PHP upload limits to a value that matches your site's real needs, something like 32-64 MB, as a permanent setting, and compress large media files before uploading them. Those two steps prevent most 413 errors before they happen.

Need help with this?

Custom Software

Explore the serviceGet in touch
Good work starts with a conversation.

Let’s make
it matter.

Izmir office
Tariş Cd. (1497. Sok.) No. 5C Ofis P22
35230 Alsancak, İzmir, Türkiye
UK office
167 Sheen Lane
SW14 8NA London, United Kingdom
Kayseri office
Sahabiye Mh. Buyurkan Sok. No.29
38015 Kocasinan, Kayseri, Türkiye
Send your project brief