How to Solve the "413 Request Entity Too Large" Error for Your WordPress Website (2024)

WordPress errors come in all shapes and sizes. In most cases they’re easy to decipher; such is the accessibility of WordPress’ error reporting. Even so, when the “413 Request Entity Too Large” error pops up, it can leave you scratching your head.

Without realizing it, you already have everything you need to understand and diagnose the error within its name. The good news is you won’t need more than a standard Secure File Transfer Protocol (SFTP) client and administrator access to your server.

In this post, we’ll take a look at how to solve the “413 Request Entity Too Large”error. We’ll also give you a quick list of steps to take before you begin to solve the error, to make the process super straightforward.

Check out our video guide to fixing the “413 Request Entity Too Large” Error

What the “413 Request Entity Too Large” Error Is (And Why It Exists)

We noted that there’s a clue in the error name as to what the solution and problem are. Before you go sleuthing yourself, though, we’ll spoil the surprise: it’s in the adjective “large.”

In a nutshell, the “413 Request Entity Too Large”error is a size issue. It happens when a client makes a request that’s too large for the end server to process. Depending on the nature of the error, the server could close the connection altogether to prevent further requests being made.

Let’s break the error down into its parts:

  • “413”: This is one of the 4xx error codes, which mean there’s a problem between the server and browser.
  • “Request Entity”: The “entity” in this case is the information payload being requested by the client from the server.
  • “Too Large”: This is straightforward: the entity is bigger than the server is willing or able to serve.

In fact, this error has changed its name from what it originally was to be more specific and offer more clarity. It’s now known as the “413 Payload Too Large” error, although in practice, you’ll see the older name a lot more.

As for why the error occurs, the simple explanation is that the server is set up to deny explicit uploads that are too large. Think of times when you upload a file where there’s a maximum file size limit:

How to Solve the "413 Request Entity Too Large" Error for Your WordPress Website (1)

In most cases, there will be some validation in place to stop the error… if you’re seeing the “413 Request Entity Too Large” error, those validation efforts may not be as watertight as you think.

What You’ll Need to Resolve the “413 Request Entity Too Large” Error

Fixing this error is all about raising the maximum file size for the server in question. Once that’s out of the way, you shouldn’t see the error anymore.

As such, to fix the “413 Request Entity Too Large” error, you’ll need the following:

  • Administrator access to your server.
  • A suitable SFTP client (we’ve covered many of these in the past).
  • The know-how to use SFTP — there’s a good guide to the basics on WordPress.org, and you won’t need more than that.
  • A text editor, though there’s no need for anything too complex.
  • A clean and current backup in case the worst happens.

As an aside, we mention SFTP throughout this article as opposed to FTP. In short, the former is more secure than the latter (hence the name). That said, while there are other differences you should investigate, the functionality remains the same for the vast majority of uses.

Also, it’s worth noting that the MyKinsta dashboard has plenty of functionality on hand to help you get onto your server. For example, each site displays SFTP connection information that’s easy to understand:

How to Solve the "413 Request Entity Too Large" Error for Your WordPress Website (2)

This can help you get into your site without fuss. In some cases, you may be able to import the credentials straight to your chosen SFTP client.

3 “Pre-Steps” You Can Take Before Rectifying the “413 Request Entity Too Large” Error

Before you crack open your toolbox, there are some steps you can take to help resolve the “413 Request Entity Too Large” error. Here are two — and each one may give you a welcome workaround to the error.

1. Try to Upload a Large File to Your Server Through SFTP

Because the issue is related to the file sizes hitting your server, it’s a good idea to circumvent the frontend interface and upload a large file to the server yourself. The best way to do this is through SFTP.

This is because protocols such as SFTP are almost as “close to the bone” as you can get with regards to the way you access your server. Also, you can simultaneously rule out any issues with the frontend that may be causing the error.

To do this, log into your site through SFTP and find the wp-content folder. In here will be the uploads folder.

How to Solve the "413 Request Entity Too Large" Error for Your WordPress Website (3)

Next, upload your file to this folder on the server and see what the outcome is. If the upload is successful, we suggest sending an email to the site’s developer, as they may want to investigate the issue further on the frontend.

2. Check for Server Permissions Errors

Of course, permissions errors will stop any server request from running. As such, you should check whether the user has sufficient permissions to upload files of any size. Once this is sorted, the error should disappear.

The first step is to determine whether this is an issue with a single user (in which case they may be restricted for a reason). If the “413 Request Entity Too Large” error is happening for multiple users, you can be more sure of something that needs your input.

We’d suggest two “pre-fixes” here:

  • Double-check your WordPress file permissions, just in case there’s an issue.
  • Remove and re-create your SFTP user (a general investigation is a great idea).

While they may not solve the error in the first instance, you’ll at least know that your file and user structure is as it should be.

How to Solve the “413 Request Entity Too Large Error” for Your WordPress Website (3 Ways)

Once you’ve gone through the pre-steps, you’re ready to tackle the error head-on.

The following three methods are listed from easiest to toughest, with the understanding that that the path of least resistance is the best one to take.

1. Edit Your WordPress functions.php File

First off, you can work with your functions.php file to help bump up the file upload size for your site. To do this, first log into your site through SFTP using the credentials found within your hosting control panel.

When you’re in, you’ll want to look for the file itself. The functions.php file should be in the root of your server. In many cases, this root is called www or public_html, or it could be the abbreviated name of your site.

Once you’ve found it, you can open it in your text editor of choice. If you don’t see the file, you can create it using your text editor.

Once you have a file open, enter the following:

@ini_set( '_max_size' , '64M' );@ini_set( 'post_max_size', '64M');@ini_set( 'max_execution_time', '300' );

In short, this increases the maximum file size of posts and uploads while boosting the time the server will spend trying to process the request. The numbers here could be anything you wish, but they should be large enough to make the error disappear. In practice, 64 MB is enough for all but the most heavy-duty of tasks.

How to Solve the "413 Request Entity Too Large" Error for Your WordPress Website (4)

When you’re ready, save your file and upload it to the server again. Then, check whether the “413 Request Entity Too Large” error still exists. If it does, head onto the next method.

2. Modify Your WordPress .htaccess File

Much like your functions.php file, your .htaccess file sits on your server. The difference here is that .htaccess is a configuration file for Apache servers. If you’re a Kinsta customer, you’ll know we run Nginx servers, so you won’t see this file in your setup.

Still, for those with an Apache server, this is the approach you’ll need. Much like with the guidance for functions.php, first log into your server through SFTP, then look in your root folder as before.

The .htaccess file should be within this directory, but if it’s missing, we suggest you get in touch with your host to determine where it is, and whether your server runs on Nginx instead.

Once you’ve found it, open it up again. You’ll see some tags, and the most important here is # END WordPress. You’ll want to paste the following after this line:

php_value upload_max_filesize 64Mphp_value post_max_size 64Mphp_value max_execution_time 300php_value max_input_time 300

In short, this does almost the same thing as the code you’d add to the functions.php file, but it’s akin to giving the server direct instructions.

How to Solve the "413 Request Entity Too Large" Error for Your WordPress Website (5)

When you’ve finished, save your changes, upload the file, and check your site again. If you’re still having trouble, we’d again suggest contacting your host, as they will need to verify some aspects of your setup that lie beyond the scope of this article.

3. Change Your Nginx Server Configuration

Our final method is specific to Nginx servers — those used at Kinsta. The purpose is the same as when working with the .htaccess file, in that you’re talking to the server, rather than going through WordPress.

We mentioned that for Apache servers you’ll use .htaccess. For Nginx servers, though, you’ll want to find the nginx.conf file. Rather than walk you through every step in the chain, we’ve gone over the full details in our post on changing the WordPress maximum upload size.

Remember that you’ll need to also alter the php.ini file based on the changes you make to nginx.conf. We’ve covered that in the aforementioned blog post too, so take a look there for the exact steps.

Summary

Despite WordPress being a rock-solid platform, you’ll see a lot of different WordPress errors over time. The “413 Request Entity Too Large” error is related to your server, though — not WordPress. As such, there’s a different approach to solving this error than other platform-specific issues.

If you have SFTP skills, there’s no reason you can’t fix this error quickly. It relates to the upload size specified in your server configuration files, so digging into your .htaccess or nginx.config files will be necessary. It’s a breeze to crack open your text editor and make the changes to these files, and if you’re a Kinsta customer, we’re on hand to support you through the process.

How to Solve the "413 Request Entity Too Large" Error for Your WordPress Website (2024)

FAQs

How to Solve the "413 Request Entity Too Large" Error for Your WordPress Website? ›

A 413 request entity too large error occurs when a request made from a client is too large to be processed by the web server. If your web server is setting a particular HTTP request size limit, clients may come across a 413 request entity too large response.

How to fix 413 request entity too large error in WordPress? ›

How to Fix the “413 Request Entity Too Large” Error in WordPress
  1. Reset File Permissions.
  2. Manually Upload the File via FTP.
  3. Increase Upload File Size.
  4. Modify Your Functions.php File.
  5. Modify Your .htaccess File.
  6. Modify Your nginx.conf File.
  7. Contact Your Hosting Provider.
Mar 8, 2024

How to fix 413 error code? ›

How to Fix a “413 Request Entity Too Large” Error
  1. Reset File permissions. In some cases, the "413 Request Entity Too Large" error can be caused by incorrect file permissions on your server, so resetting these permissions could help. ...
  2. Manually Upload the File through FTP. ...
  3. Contact Your Hosting Provider.
Apr 3, 2024

What is a 413 request entity too large? ›

A 413 request entity too large error occurs when a request made from a client is too large to be processed by the web server. If your web server is setting a particular HTTP request size limit, clients may come across a 413 request entity too large response.

How to fix request entity too large in Chrome? ›

Google Chrome
  1. On Windows, press F12 in your browser or Ctrl + Shift + i (Command + option + i on Mac).
  2. That will open developer tools as shown in the below screenshot.
  3. Go to Application -> Cookies.
  4. Right click on Cookies and click on Clear.
  5. Reload the page.

How do I reduce the number of HTTP requests in WordPress? ›

How to Optimize and Make Fewer HTTP Requests in WordPress
  1. Remove Unnecessary WordPress Plugins. ...
  2. Replace Heavy Plugins With More Lightweight Ones. ...
  3. Conditionally Load Scripts That Aren't Needed Sitewide. ...
  4. Remove Unnecessary Images (And Optimize the Rest) ...
  5. Use Lazy Loading for Images and Videos.
Oct 19, 2020

How to fix 413 payload too large in .NET Core? ›

config and web.

The HTTP 413 Payload Too Large response status code indicates that the request entity is larger than limits defined by server; the server might close the connection or return a Retry-After header field. The simplest solution is that increasing the upload size limit.

What is HTTP server error 413? ›

Symptom. The 413 status code indicates that the request was larger than the server is able to handle, either due to physical constraints or to settings. Usually, this occurs when a file is sent using the POST method from a form, and the file is larger than the maximum size allowed in the server settings.

What is client error from HTTP 413? ›

This error occurs because the pushed files exceed the 10 GB file size limitation. As per our GIT LFS documentation, there is a 10 GB file size upload limit for LFS. This limitation applies to individual file sizes, so if you attempt to push a file larger than 10 GB, the operation will fail with a HTTP 413 error.

What is the default size of a 413 request entity too large? ›

IIS has a limit for the size of the files users can upload to an application. If the file size exceeds the limit, the application will throw “Error in HTTP request, received HTTP status 413 (Request Entity Too Large)” error. The default file upload size is 49 KB (49152 bytes).

What is a 413 payload too large in PHP? ›

How to solve 413 Request Entity Too Large error. To solve this error, you simply need to increase the server resources whose limits lead to the error. Those are the file upload size and the maximum time allowed for executing PHP scripts. We will show you various ways of increasing server resources.

What is fluent bit 413 request entity too large? ›

The 413 Request Entity Too Large error occurs when users attempt to upload a file whose size is larger than the web server's limit. Although this server limit can help prevent back-end overloading and downtime, it can lead to issues when set too low.

How do I fix bad request request too long in Chrome? ›

Five Ways To Fix 'Request Header Or Cookie Too Large' Error Code:
  1. #1. Clear Browser Cookies And Cache.
  2. #2. Reset Your Browser.
  3. #3. Restart Your Device and Other Hardware.
  4. #4. Flush DNS Cache.
  5. #5. Contact the Site Owner To Report The Error.
Oct 31, 2023

How do I clear the cache in Chrome? ›

Click the Menu in the upper right. Choose "Clear Browsing Data." The most effective setting is to clear all browsing history for All time and to clear browsing history, download history, cached images and files, and cookies. Close your browser and restart to see changes.

How do I clear bad requests in Chrome? ›

6 Methods to Fix the Error 400
  1. Clear Outdated DNS Cache. ...
  2. Disable Browser Extensions. ...
  3. Cross-Check the Domain Address. ...
  4. Clean Corrupted/Outdated Browser Cookies and Cache Data. ...
  5. Review and Ensure Proper File Size. ...
  6. Try Restarting PC or Relevant Hardware.

How do I fix too many redirects error in WordPress? ›

How to Fix “ERR_TOO_MANY_REDIRECTS”
  1. Force a Page Refresh in Your Browser. ...
  2. Clear Browser Cookies. ...
  3. Flush All Caches. ...
  4. Find the Cause of the Redirect Loop. ...
  5. Check Your WordPress URL Settings. ...
  6. Look for Misconfigured HTTPS Settings. ...
  7. Temporarily Disable WordPress Plugins. ...
  8. Examine Your CDN or WAF Configuration.
Apr 2, 2024

How to exceeds the maximum upload size for this site WordPress plugin? ›

Open WordPress admin, go to Plugins, click Add New. Enter “Increase Max Upload Limit” in search and hit Enter. Plugin will show up as the first on the list, click “Install Now” Activate & open plugin's settings page located in the main admin menu.

How do I fix nginx 413 request entity too large? ›

Modify NGINX Configuration

In NGINX servers, the client_max_body_size configuration lets you set the maximum size of the client request HTTP block. To resolve the issue, reconfigure NGINX to increase the maximum capacity limit for uploading files by editing the nginx. conf file using a text editor like Vi.

How do I fix 400 Bad Request in WordPress? ›

To resolve a 400 Bad Request error in WordPress, check for URL errors, clear your browser cache, deactivate browser extensions that may conflict, and ensure that any files you are uploading are within the acceptable size limit set by the server.

References

Top Articles
Latest Posts
Article information

Author: Moshe Kshlerin

Last Updated:

Views: 5379

Rating: 4.7 / 5 (77 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Moshe Kshlerin

Birthday: 1994-01-25

Address: Suite 609 315 Lupita Unions, Ronnieburgh, MI 62697

Phone: +2424755286529

Job: District Education Designer

Hobby: Yoga, Gunsmithing, Singing, 3D printing, Nordic skating, Soapmaking, Juggling

Introduction: My name is Moshe Kshlerin, I am a gleaming, attractive, outstanding, pleasant, delightful, outstanding, famous person who loves writing and wants to share my knowledge and understanding with you.