Call Us Toll Free - US & Canada : 888-818-9916 UK : 800-069-8778 AU : 1800-990-217
413 Request Entity Too Large

Fixing the 413 ‘Request Entity Too Large’ Error like a Pro

Spread the love

Website building and maintenance is a very tedious and ongoing job. There is something that will keep on showing up one after another. No matter how diligently you move, any unwanted HTTP error will hinder your end-user experience for sure.

If you’re a website owner then you must have encountered the ‘413 Request Entity Too Large error for sure. The occurrence of this error will stop the visitors from accessing your website and if that happens, neither the traffic nor the revenue will be generated. All your efforts invested in website building will go in vain.

Do you want this? No one wants this.

Well, we have a piece of good news for you. This notorious error can be handled with full diligence. Wondering how? Let’s figure it out together in this post.

What is 413 Error: A quick Overview to the Trouble-maker

It’s not wise to know the solution if you don’t know the cause of the problem. It would be like aiming in the dark. So, before you move any further, get familiar with the ‘413 Request Entity Too Large’ error. It’s one of the customary HTTP error codes that occur when client request size exceeds the server file size limit.

Web servers come with certain request limits and take appropriate measures to ensure that they are not overloaded with users’ requests.

This request limit is set for good and is indeed a boon when the website files request remains under the limit. But, if exponentially large files are uploaded then 413 ‘Request Entity Too Large’ the error will pop up and it will hinder website performance.

This exceeded limit will also stop large media files and images to be uploaded on the website. In that case, the error will display in a different format.

Fixing the ‘413 Request Entity Too Large' Error

The root of this error is in the default size limit of the server and how it’s set up. So, if you need to fix the ‘413 Request Entity Too Large’ error, get ready to work with the server configuration.

Below-mentioned is the methods that you must bring into action to get the job done:

If the website runs on WordPress

Wordpress

Mostly, websites managed on WordPress content management systems face this error because of a faulty theme and plugin. Don’t fret. You can resolve this issue by simply increasing the upload size limit of WordPress and make it enough for large file uploading.

While trying this method, make sure that you’re not exceeding the hosting plan limit. Here is how you can go about it.

1. Tone Down PHP.ini

One of the most straightforward methods to fix the ‘413 Request Entity Too Large’ error is to modify the PHP.ini file of the server. In this file, one can easily alter the limits via the cPanel interface without getting involved in any tedious coding.

Follow these steps to achieve the goal:

a. Go to the cPanel and select MultiPHP INI Editor. It will feature in the Software section.
b. As a new window pop-up, select the used domain.
c. Once the domain is spotted, alter the below-mentioned parameter’s value as per the choice:

      •  max_execution_time that refers to maximum time to upload, in seconds
      •  upload_max_filesize that indicates maximum upload size, in megabytes
      •  post_max_size that refers to maximum post size, in megabytes

d. Once the value is reset, click Apply to activate the done changes.

2. Change .htaccess

WordPress websites hosted on Apache server need .htaccess file alteration for changing the upload limits. The .htaccess file is the one that features multiple server directives. Access this file from the dashboard and enter the desired upload limits. Here are the detailed steps:

a. Go to cPanel and look for File Manager under the Files section.
b. Access root WordPress directory and look for .htaccess file. This file could be hidden as per the server settings.
c. Once you got the .htaccess file, click on the Edit icon.
d. Go to the bottom of the file and enter below-mentioned code:

i. php_valueupload_max_filesize 64M
ii. php_valuepost_max_size 64M
iii. php_valuemax_execution_time 300
iv. php_valuemax_input_time 300

3. Modify functions.php

Lastly, you can change the size limit in the functions.php file and get rid of this error. The file will be featured in the WordPress theme. To make this happen:

i. Access the cPanel menu and go to the File Manager section.
ii. Now, you need to spot the current theme folder inside the WordPress directory. Default, this folder will be public_html. Open this theme file and select functions.php.
iii. Select Edit icon and copy the:

@ini-set (‘upload_max-size’.’64M’);
ini_set (‘post_max_size’, ’64M’);
@ini_set (‘max_execution_time’, ‘300’); code and paste it where the file ends.

iv. Select Save to store the done changes.
v. Changing this code will set 64 megabytes as the maximum WordPress upload size. This number can be altered as per the requirements. If you need more upload time then just enter it.

If the website is managed on Nginx Server

Nginx

Some of the websites are hosted on an Nginx server and to change the upload limits settings, one has to access nginx.conf file and enter the desired limit. Access it from the cPanel, open it, and check for client_max_body_size directive. Here, you can enter the desired upload limits.

If, by any chance, this directive is not visible in nginx.conf, you can add the changed upload limits in it to the end of a server, location, or http block with the help of the below-mentioned code:

server {

client_max_body_size 64M;
}

Doing so will set 64-megabyte as the upload limit. Again, you can change the preferences as per the need of the hour. Don’t forget to apply the done change to make them permanent.

All the above methods must fix the ‘413 Request Entity Too Large’ error. If the error is still persisting the trouble must be existing in the website’s CDN server or because some hosting provider imposed restrictions.

In the latter option, seeking professional hosting support is the best bet to make. Contact them and explain the issue in detail. They will take care of the issue accordingly.

If the cause exists in CDN then roll up your sleeves once again. Many website owners use CDN for performance improvement. But, knowingly and unknowingly, CDN servers will put file size restrictions.

Changing these restrictions is not possible by a novice. You have to consult with the CDN provider. You can also contact product support to fix this error.

If nothing else works then the last resort is to upload the optional files, trim down the current file size, or upgrade the current storage plan.

The Final Say

Seeing the ‘413 Request Entity Too Large’ error, again and again, can be too frustrating. For a website owner, it’s more than crucial to fix it before it hurts the website ranking, reduces revenue, and wastes all your efforts.

Early detection and resolution will save you on many fronts. In this blog, we told you some of the most viable ways to fix the error. They are all very simple to implement and are going to help you for sure. For instance, you can change the settings in PHP.ini, .htaccess file, and functions.php file.

If the issue is with the CDN server, the better is to contact the product provider. If you feel that fixing this error is too much work then it’s better to turn towards professional help as you can’t overlook this error.

If your site often gives Error 413, it may impact your SEO visibility and ranking. Contact 24x7WPSupport experts to resolve the issue faster.

Join the discussionSHARE YOUR THOUGHTS

Top 7 WooCommerce SEO Plugins for 2023 to Boost Your Google Ranking