How To Fix “413 Entity Too Large Error” (Screenshots)

413 Entity Too Large Error is one of the most common WordPress errors. This error normally appears when you try to upload a heavy file on your site, but your server is unable to process it.

Errors like these can scare anyone, especially if you’re a beginner. However, fixing error 413 is easier than error 405 or 400.

In this tutorial post, we’re gonna learn how to fix and avoid error 413 by doing a few tweaks. The steps shown in this post are beginner-friendly, however, you need to pay special attention to some parts, so that you don’t mess up anything.

Let’s begin!

What Exactly 413 Entity Too Large Error Means?

According to IBM, a 413 Error ‘Request Entity Too Large,’ The 413 status code means that the request was larger than the server can handle, either due to physical limitations or to settings.

Let’s understand it in simple words.

The name of the error itself gives a hint about what we need to fix to get our site back. This error can appear on your site when a client makes a request that is too large for the server to handle.

“413” means there is something wrong between server and browser. 413 also means that this error belongs to the 4xx family. “Entity Too Large” informs that the request made by the client is more than the capacity of the server.

When this error comes on your site, the server closes the connection to prevent further damage, and that’s why it becomes impossible to use our site at that time.

How To Resolve 413 Entity Too Large Error

Before you begin following the steps shown below, it’s my request to please create a backup of your site. A backup lets you do whatever you want to do with your site without fear of losing anything.

Solution 1: Edit Your .htaccess File

The .htaccess file is one of the most important files that control the high-level configuration of your website. Even the smallest of mistakes in this file could invite severe errors.

However, the .htacces file is only available for servers that use Apache. You will not find the .htaccess file if your server uses the NGINX server. Check solution number 3 if your server uses NGINX.

  • How to check which server software your site is using

To check which server software your website is using, go to whois.domaintools.com, enter your website name, scroll down a little bit, under website, look for Server Type.

How To Edit The .htaccess File To Fix The Issue

Remember to create a backup before you begin editing your site’s most important file.

Step 1: Log in to your host panel or FTP

Log in to your control panel. If you don’t remember your password then check the email you received just after purchasing the hosting plan.

Step 2: Open File Manager

The File Manager option is available under “Files”, click on it once you find it.

Step 3: Open public_html Folder

The public_html folder holds some important information. Click on it.

Step 4: Open your .htaccess File

The .htaccess file should be visible to you, if it is not showing to you, then click on the settings icon and select “show hidden files”, you’ll find it.

Step 5: Enter this 4 liner code

Now, this is the most important part so please pay special attention. Once the file is open, look for the line that says # END WordPress

Once you find it, enter this code below # END WordPress

php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300

It should look something like this:

With help of this code, we’re giving our server instructions to increase the limit, so that this issue can resolve. By adding this code, you’re also preventing future conflicts.

Step 6: Click on Save once you’ve added the code successfully

The most important part, click on save to save every change you’ve made.

Solution 2: Edit Your functions.php File

WordPress themes come with functions.php or the theme functions file. It is a template included in WordPress themes that acts as a plugin for your WordPress site that is automatically triggered with your current theme. The functions.php file utilizes PHP code to add features or change default elements on a WordPress website.

The functions.php file automatically loads when you activate a theme on your WordPress website.

Editing the functions.php file utilizing custom codes lets you add post types, taxonomies, shortcodes, and more to enhance your website.

The functions.php file can also help to increase the file upload size for your site. Let’s learn how to do it.

How To Edit Your functions.php File

Again, create a backup before you proceed!

Step 1: Log in to your hosting panel

I’m currently using hPanel by Hostinger, if you’re cPanel or any other hosting panel, don’t worry because the steps are the same.

Step 2: Go to your File Manager

Once you’re logged in to your hosting panel, find File Manager, it should be available under Files.

Step 3: Open public_html Folder

The public_folder is vital for your website, it contains a lot of important information, double click on it to open it.

Step 4: Click on wp-content then Open themes Folder

wp-content holds information about your website’s themes and plugins, it’s an important folder that can help us resolve most of the problems that occur on our WordPress sites.

Open the wp-content folder.

Once the folder is open, click on “themes”, under the themes folder, you’ll find the current theme you’re using, for example, I’m currently using Astra, so I’ll see a folder called “Astra”, I’ll need to open that Astra folder to see the functions.php file.

Step 5: Add this Code in functions.php File

functions.php file will look something like this, double click on it to open it.

Add this code once the file is open. (Add the code at the bottom of the page)

@ini_set( 'upload_max_size' , '256M' );
@ini_set( 'post_max_size', '256M');
@ini_set( 'max_execution_time', '300' );

It should look something like this:

Step 6: Click on Save

Click “Save and Close” to save everything you’ve done. Now, go to your site, refresh it, check whether it’s working or not.

Solution 3: Modify Your Nginx Configuration

If your site runs on an Nginx server, then following the steps shown in solution number 1 won’t help you. Nginx server doesn’t have a .htaccess file, they use Nginx.conf file. So you’ll need to access your nginx.conf file.

You might be wondering which server software is better, Apache or Nginx? The answer is simple, it’s Nginx, it is better than Apache any day.

According to Serverguy, Nginx performs 250% faster than Apache according to a benchmark test running up to 1000 simultaneous connections. Nginx serves the static resources without PHP having to know about this. On the other hand, Apache runs all those requests with that costly overhead.

Add the following strings in Nginx.conf as shown in the example below. It sets the max body size of a client request that the server allows. So, make sure you put the correct number as your maximum size.

# set client body size to 8M #
client_max_body_size 8M;

Save and close the file. Then, reload the Nginx web server with the following command:

# nginx -s reload

After that, go to your website and check the error 413.

Solution 4: Contact Customer Support

Your host must be having a customer support team. Reach out to them as soon as possible because they are experts in fixing issues like this.

Beginners should not take the risk of adding codes in their site’s configuration files because even the slightest of mistakes can do a lot of damage to your wonderful website.

A customer care executive sees errors like this on a regular basis, they know what they are doing. So, let them fix the issue on your behalf.

Raise a ticket by visiting their website or call on the emergency number given by them. Also, do not wait because Google hates those sites that provide a poor experience to users. Having a 413 error will certainly not help your site. You might lose your rankings, so contact them as soon as you can.

HostGator – 0824 661 4102

Bluehost – 00 1 801-765-9400

Godaddy – 040 6760 7600

SiteGround – Chat Support 24/7 – Read How To Contact SiteGround Customer Support

Hostinger – Live Chat Support 24/7 – Contact Now

Kinsta – 24/7 Live Chat Support

Cloudways – +35635500106

A2Hosting – 888-546-8946

DreamHost – 24/7 Live Chat Support

Similar Error Solutions:

How To Fix 429 Too Many Requests Error (6 Pro Tips)

How To Fix 405 Method Not Allowed Error (10 Solutions)

How To Permanently Fix 404 Error (Not Found Error)

400 Bad Request Error (Fixed) 7 Easy Ways

How To Permanently Fix A 403 Forbidden Error (Screenshots)

It’s A Wrap!

413 Entity Too Large error is a common error that bloggers face. This issue can be resolved by increasing the upload limit. To increase the limit, you edit your functions.php or .htaccess file. You’ll just need to add a simple 4 liner code there.

However, if you’re a beginner and don’t know much about the .htaccess and functions.php file then contacting your customer support would be a better idea. Resolving this error on your own includes risk.

Here are some tutorials that can make your site better!

How To Reduce Server Response Time (TTFB) 14 Terrific Ways

How To Increase PHP Memory Limit To Fix Fatal Error Allowed Memory Size Exhausted

How To Eliminate Render Blocking Resources (7 Powerful Ways)

How To Detect Plugins Which Are Slowing Down Your WordPress Site (Ultimate Guide)

How To Serve Scaled Images (Properly Sized Images) In WordPress

Default image
Sumit

Sumit is a regular contributor to Hostinggrow.com. He has 6 years of experience in blogging, and he loves football, his favorite player is - Lionel Messi (GOAT), but he has no hate for Ronaldo.

Articles: 54

Leave a Reply