Ways To Fix 413 Request Entity Too Large Error For WordPress Site

Ways To Fix 413 Request Entity Too Large Error For WordPress Site

userPosted by Richard

Do You Often Receive 413 Request Entity Too Large Error For WordPress Site? What are your first instinctive steps to fix the issue? What solutions come to your mind? To find the fix to this problem, you first need to diagnose the issue. 

Usually, this occurs when there is too much uploaded on a website. The application then throws a 413 Request entity too large error despite adding the file to the server. 

Expert Tip:

Thus, it is vital to keep such essential guidelines in mind when uploading the file. Hence, the theme or plugin you’re using may be exceeding the actual size. Otherwise, your web server will have issues uploading the file. However, if you come across such a situation, reconfiguring the server is also a better option.

  • Error Causes: 413 Requests Entity Too large
  • Error Type: Client Side
  • Error Variations:  413 Payload Too Large, HTTP Status Code 413
  • Error Causes: Request too large, PHP limits too low, The page was not displayed because the request entity is too large.

What Does The “413 Request Entity Too Large” Error Mean?

In layman’s terms, it means when you’re exceeding the file capacity, the server will deny the request with an error in the form of the “413 Request Entity Too Large” Error Mean. Hence, it is very crucial to keep this in check. Also, your web server will not let your file be uploaded. If it occurs, just try to reconfigure your server to get it fixed quickly. By reading this blog, you’ll learn more about the issue.

In general, a web server sets a definite HTTP request size limit to prevent users from crashing the site. Exceeding storage permissions and uploading a large file to a server could lead to a 413 Request Entity Too Large WordPress error issue.

Let’s break this error into easy fragments to understand What Does “413 Request Entity Too Large” Error Mean? Let’s have a glimpse:

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

How To Resolve 413 Requests Entity Too Large?

Here are the key things to resolve 413 Request Entity too Large Fix:

  • Administrator access to your web server for a WordPress website
  • A suitable SFTP client
  • The know-how to use SFTP — a proactive guide to the basics available on WordPress.org
  • A text editor, as there are no such complex requirements
  • A clean and current backup to tackle unforeseen situations

Two Proven fixes to implement the 413 Entity Too Large issue.

Important! Two of the methods deal with important WordPress files, so backing up files before starting any configuration is always a good option. 

Fixes 1: Upload A Large File To A Server Through SFTP

Although the issue is related to the file sizes, it’s a good idea to evade the front-end interface. Afterward, try an effort to upload a large file to the server yourself. You can do it optimally by using the SFTP protocol. Let’s do it now!

  • First, log in to your WordPress website through SFTP using the correct login credentials
  • Once logged in, locate the “wp-content” folder
  • There, you will see the “Uploads” folder.
  • Afterward, upload your file to this folder on the server and see the results
  • Once the file is uploaded successfully, we recommend you send an email to the site’s developer. They have the efficiency to investigate the issue further on the front
  • If required, remove and re-create your SFTP user.

Fixes 2: Check For Server Permissions Errors

Most probably, permission errors won’t enable server requests to run. Thus, it is always a prudent choice to check whether the user has sufficient permissions to upload theme or plugin files of any size. Once this is sorted, the particular Error 413 Code disappears.

If it is not fixed and you are looking for solutions, you can try these advanced solutions to fix 413 Request Entity too large.

Advanced Solutions To Fix 413 Request Entity Too Large

Adjusting your file size or increasing the size limit will be the possible productive solution to get rid of a 413 Request Entity Too Large error. Depending on the web server you use for your WordPress website, you can modify the size limit accordingly. Let’s do it in a few clicks:

Solution 1: Modify PHP.ini

The comprehensive steps to adjust your server’s PHP.ini file to enhance the upload limit are mentioned underneath. Start following the given directives and hassle-freely change your limit through the cPanel interface as coding is not required:

  • First, in your cPanel menu, select the “MultiPHP INI Editor” tab under Software.
  • Then, in the window that appears, opt for your domain from the dropdown menu.
  • Now, change the values as per your preference:
  1. max_execution_time (maximum time to upload, in seconds)
  2. upload_max_filesize (maximum upload size, in megabytes)
  3. post_max_size (maximum post size, in megabytes)
  • Once done, click the “Apply” button to save the changes.

Solution 2: Modify the functions.php File

The functions.php file is often used to define ‘classes’ and ‘actions’ on your WordPress site. Moreover, it can add several additional features and functionalities such as enabling post thumbnails, post formats, and navigation menus. Let’s adjust the file limit by following the given steps:

  • First, access your Hostinger cPanel menu.
  • Now, go to the “File” section and select the “File Manager” option.
  • Now, you will see three folders under the public_html folder.
  • Simply, click the “wp-content” folder. Doing this, a list of files will appear on the right side.
  • Afterward, give a double-tap on the “Themes” folder to find the “functions.php” file.
  • Once you find it, select the “functions.php” file.
  • And then, give an instant click on the “Edit” icon.
  • Now, add the following code snippet at the end of the file:
  1. upload_max_size
  2. post_max_size
  3. max_execution_time
  • Finally, click the “Save” button to save the changes.

Now, try to upload a theme or plugin file to test if you still have an HTTP 413 Request Entity Too Large error or it is solved.

Solution 3: Modify .htaccess file

For an Apache server user, change the size limit by updating your .htaccess file to solve the 413 Request Entity Too Large WordPress error. Here’s how:

  • First, open your Hostinger cPanel menu.
  • Then, go to the “Files” section and select the “File Manager” tab.
  • Afterward, navigate to your “public_html” folder and locate the “.htaccess” file. Depending on your settings, the .htaccess file may be hidden.
  • Place double-click on the .htaccess file.
  • A pop-up window will instantly evolve where you can add the respective code.
  • To start adding the code, click the “Edit” icon.
  • Copy and paste the following code:
  1. php_value upload_max_filesize 256M
  2. php_value post_max_size 256M
  3. php_value max_execution_time 600
  4. php_value max_input_time 600
  • Click “Save” to save the changes.
  • Now, reload the Apache server to check whether the 413 Request Entity Too Large error is been sorted out or not.

Solution 4: Modify Nginx Configuration

If really the web server is set to restrict large file sizes, chances is high to confront 413 Request Entity Too Large. Nginx has client_max_body_size to allow the maximum size of the client request body. Once you adjust the size limit, an error message will disappear. Thus, it is extremely required to reconfigure Nginx to extend the limit and upload files without any hindrance. To do so, perform the following steps:

  • First, open the “nginx.conf” file
  • Next, check for the directive “client_max_body_size”.
  • Thereafter, change the value (in megabytes) to your maximum file size preference.
  1.  # set client body size to 8M #
  2. client_max_body_size 8M;
  • If you do not see this directive in nginx.conf, you can add it to the end of a server, location, or HTTP block.
  • Now, in the end, save and close the file.

Feel free to reload the Nginx web server using the following command:

  • # nginx -s reload

Now, proceed to check if Error 413 is completely gone.

Final Thought

Uploading a larger file than the permissible limits in the web browser will often lead to 413 Request Entity Too Large errors in WordPress. You still have a way out by facing different methods, considering the server.

If the issue persists, you can call us at the given helpline number and our representatives will be able to resolve your concern.

Tagged with:
  • On Time Delivery

  • 50

    Discount

  • 24×7 WordPress Support

  • Cost Effective Services

  • Skills Wordpress Developers

  • 100% Satisfaction