When building and maintaining a website, you're jump to see some unexpected HTTP errors here and there. Issues like these are tough to avert, and some are trickier to resolve than others.

If you're experiencing a "413 Request Entity Also Large" error, the good news is that this issue is quick and unproblematic to address — you simply need to practice a scrap of server reconfiguration. And no, you don't need to be a technical good. Let's learn how.

Download Now: Free Intro Guide to HTML & CSS

Web servers place size limits on uploads to prevent users from overwhelming the server and exceeding storage permissions. This limit ordinarily isn't an issue, and common website files should stay well nether it. However, especially large file uploads may occasionally exceed the limit, resulting in a message similar this:

a 413 request entity too large error in a browser window

While you can reduce the size of your upload to become around the mistake, it's also possible to change your file size limit with some server-side modification.

How to Fix a "413 Asking Entity Likewise Large" Error

Your default upload size limit will depend on how your server is set up up. In this guide, we'll show you how to fix a 413 error past increasing your size limit with a WordPress setup, every bit well as with an Apache or Nginx server configuration.

All methods require some edits to your server files, so we recommend creating a backup before attempting the steps below.

WordPress

Themes and plugins are common causes of the 413 error with the WordPress content management system. Fortunately, there are several ways to increment your WordPress upload size limit enough to let these larger files through. Every bit long as you do not exceed the limits of your hosting plan, you can try any of the following:

Modify PHP.ini

The easiest method to increase your upload limit is by modifying your server's PHP.ini file. Here, you can change your limit through the cPanel interface without whatever coding. To practice this:

one. In your cPanel menu, select MultiPHP INI Editor under Software.

how to fix request entity too large: software section in cpanel

two. In the window that appears, cull your domain from the dropdown menu.

3. Change the values of the following parameters to your preference:

  • max_execution_time (maximum time to upload, in seconds)
  • upload_max_filesize (maximum upload size, in megabytes)
  • post_max_size (maximum mail size, in megabytes)

4. When finished, click Apply.

Modify .htaccess

If your WordPress site is hosted on an Apache server, it'southward too possible to increase your server's limit via .htaccess, a file that contains many directives for the server. Come across the solution below.

Modify functions.php

You can also try increasing your size limit via the functions.php file of your electric current WordPress theme.

If you want to make this alter permanent, we recommend trying the in a higher place approaches first. With this approach, y'all'll need to update functions.php whenever you lot update or modify your electric current theme.

1. In your cPanel bill of fare, select File Manager under Files.

how to fix request entity too large: files section in cpanel

2. Navigate to the folder of your current theme inside your root WordPress directory (public_html by default). Open this theme file.

3. Select functions.php and click the Edit icon.

4. Copy the code beneath and paste it at the end of the file

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

5. Click Save.

This code sets the maximum allowed size of your WordPress uploads and posts to 64 megabytes. You can change this number to something larger or smaller if y'all demand, equally long equally you practise not exceed your hosting plan'south storage limit.

It also sets the maximum period your uploads can take to 300 seconds. Experience free to alter this every bit well.

Nginx Server

Nginx server settings can be modified within the file nginx.conf. Open this file and check for the directive client_max_body_size. Then, change the value (in megabytes) to your maximum file size preference.

If you lot do not see this directive in nginx.conf, you tin add information technology to the cease of a server, location, or http cake like then:

                                          
server {
          ...
          client_max_body_size 64M;
}

This allows for a 64-megabyte upload. Gear up this number to your preference, save the file, so reload Nginx for the alter to take effect.

Apache Server

Change the size limit on an Apache server past updating your .htaccess file like and so:

1. In your cPanel menu, select File Manager under Files.

2. In your root WordPress directory (public_html by default), locate .htaccess. Depending on your settings, the .htaccess file may exist subconscious.

three. Select .htaccess and click the Edit icon.

4. Copy and paste the lawmaking beneath at the bottom of your .htaccess file:

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

5. Click Save and reload Apache.

Doing this sets the maximum allowed size of your WordPress uploads and posts to 64 megabytes and sets the maximum file upload time to 300 seconds. You lot can change both of these values to your preference.

Nonetheless getting a 413?

After trying ane or more of the solutions above, you even so may encounter a 413 error when uploading big files, even if these files are below your new size limit.

In this case, the issue may stem from your CDN'due south servers or another restriction set past your hosting provider. First, reach out to your hosting support, detailing the problem and the steps you've taken so far to resolve it. It may be that you've exceeded your plan'southward file size limit without realizing. Or, your configurations may have inadvertently acquired another error.

If yous apply a CDN to better your site's performance, this may also be the cause of your event — the CDN servers yous're using may impose file size limits that are too small. Since yous probably can't modify these servers' files directly, you consult the documentation for your CDN provider or contact product support to resolve the mistake.

If all else fails, consider uploading alternative files, reducing the size of your current file, or upgrading your storage plan. If you notice yourself needing to upload a massive amount of data, more likely than non there'due south a workaround.

Fixing a 413 Error

While HTTP errors can exist frustrating, many are quickly solvable including a 413. By finding and tackling this issue at present, you'll have one less thing to worry near while building out your website. If your site allows users to upload their own content, changing your upload size limit solves this trouble too — just brand certain you're not exceeding the limits set by your hosting plan.

As for the all-time option, we recommend WordPress users change their server's PHP.ini file starting time if possible, since this tin can easily be done through your hosting panel. Otherwise, choose the option that matches your server software.

This post was originally published in January 2021 and has been updated for comprehensiveness.

New Call-to-action

css introduction

Originally published Oct v, 2021 7:00:00 AM, updated March 31 2022