When edifice and maintaining a website, you're jump to encounter some unexpected HTTP errors here and there. Problems similar these are tough to avert, and some are trickier to resolve than others.

If you're experiencing a "413 Asking Entity Too Large" fault, the practiced news is that this issue is quick and elementary to address — yous simply demand to do a bit of server reconfiguration. And no, you lot don't need to be a technical practiced. Let'southward larn how.

Download Now: Free Intro Guide to HTML & CSS

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

a 413 request entity too large error in a browser window

While yous can reduce the size of your upload to become around the error, information technology's also possible to alter your file size limit with some server-side modification.

How to Fix a "413 Request Entity Too Big" Error

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

All methods require some edits to your server files, then we recommend creating a fill-in earlier attempting the steps below.

WordPress

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

Alter PHP.ini

The easiest method to increase your upload limit is by modifying your server'due south PHP.ini file. Here, you can alter your limit through the cPanel interface without whatsoever coding. To practise this:

ane. In your cPanel bill of fare, select MultiPHP INI Editor nether Software.

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

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

three. Modify the values of the following parameters to your preference:

  • max_execution_time (maximum fourth dimension to upload, in seconds)
  • upload_max_filesize (maximum upload size, in megabytes)
  • post_max_size (maximum post size, in megabytes)

4. When finished, click Use.

Change .htaccess

If your WordPress site is hosted on an Apache server, it's also possible to increase your server'due south limit via .htaccess, a file that contains many directives for the server. Encounter the solution below.

Change functions.php

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

If you want to make this change permanent, we recommend trying the above approaches starting time. With this arroyo, yous'll need to update functions.php whenever yous update or change your current theme.

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

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

two. Navigate to the binder of your current theme within your root WordPress directory (public_html past default). Open up this theme file.

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

4. Copy the lawmaking 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 Salvage.

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 you need, equally long as you practice not exceed your hosting plan's storage limit.

It also sets the maximum period your uploads tin can take to 300 seconds. Feel free to modify this likewise.

Nginx Server

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

If you lot practise not see this directive in nginx.conf, y'all can add it to the end of a server, location, or http cake like so:

                                          
server {
          ...
          client_max_body_size 64M;
}

This allows for a 64-megabyte upload. Set up this number to your preference, salve the file, then reload Nginx for the change to take upshot.

Apache Server

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

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

2. In your root WordPress directory (public_html past default), locate .htaccess. Depending on your settings, the .htaccess file may be hidden.

3. Select .htaccess and click the Edit icon.

4. Re-create and paste the code below 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 can change both of these values to your preference.

Still getting a 413?

After trying i or more of the solutions higher up, y'all still may run across a 413 fault when uploading large files, even if these files are below your new size limit.

In this case, the issue may stem from your CDN's servers or some other brake set past your hosting provider. Start, reach out to your hosting support, detailing the problem and the steps you lot've taken and then far to resolve it. It may exist that yous've exceeded your plan'due south file size limit without realizing. Or, your configurations may have inadvertently caused another error.

If you apply a CDN to ameliorate your site'south performance, this may likewise exist the cause of your outcome — the CDN servers you're using may impose file size limits that are too small. Since you probably can't change these servers' files direct, you lot consult the documentation for your CDN provider or contact product back up to resolve the error.

If all else fails, consider uploading culling files, reducing the size of your current file, or upgrading your storage plan. If you find yourself needing to upload a massive amount of data, more likely than not there's a workaround.

Fixing a 413 Error

While HTTP errors can be frustrating, many are speedily solvable including a 413. Past finding and tackling this issue at present, y'all'll accept one less thing to worry nearly while building out your website. If your site allows users to upload their own content, changing your upload size limit solves this problem too — just make certain you're not exceeding the limits set by your hosting program.

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

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

New Call-to-action

css introduction

Originally published Oct five, 2021 vii:00:00 AM, updated March 31 2022