Type to search

Learn How to Resolve “413 Request Entity Too Large” Error

You may encounter the ‘413 Request Entity Too Large’ error while uploading a theme, plugins, or other media files on the webserver. Whenever you face this error, it indicates that the server doesn’t accept the file due to its large size. 

All the web hosting organizations configure their server to a particular file uploading limit. Hence, if the server detects a larger file, it starts displaying this error constantly. 

In this guide, you will know some effective hacks to troubleshoot this error in a few minutes. So, you are recommended to take a look at the fixes discussed below before beginning the troubleshooting. 

Easy Hacks to Fix “Request Entity Too Large” Issue

There are a few ways through which you can get rid of this error. So, you can try the hacks described below if want to know how to fix request entity too large message: 

Fix 1: Using functions.php

You can solve the ‘413 request entity too large’ error easily by modifying the ‘functions.php’ file. Hence, locate the functions.php file in the WordPress theme folder. 

This file is used to define ‘actions’ and ‘classes’ on the WordPress site. Besides, it also adds functionality and features like navigation menus, post formats, enabling post thumbnails, etc. 

Here are the steps you can perform to modify the functions.php file: 

  1. First and foremost, log into your Control Panel account and then open the File Manager. Depending on the web hosting, you will get this icon at different places. 
  2. For the primary domain, you can open the public_html directory. You will find this directory at the left pane of the screen. 
  3. Next, search for the wp-content folder and right-click on it. Select the Open option from the list to open this. 
  4. Afterward, you can navigate to the ‘Themes’ folder. 
  5. Now, you will see the Inactive or Active WordPress theme of the website. Next, open the Active theme folder.  
  6. Search for the functions.php file by scrolling down the list. Right-click on it and choose the Edit option from the list.
  7. It will open a new tab. So, enter the below-mentioned code: 
    • @ini_set( ‘upload_max_size’ , ’64M’ );
    • @ini_set( ‘post_max_size’, ’64M’);
    • @ini_set( ‘max_execution_time’, ‘300’ );
  1. Tap on the Save Changes option from the upper right side of the window. 

If you want, you can expand the upload_max_size from 64 MB to 128 MB. But, most of the time, 64 MB is enough. Also, remember that no theme or plugin can be larger than 64 MB. 

Now, you can try to upload the theme again to check if the error is fixed. Else, you can go to the next solution provided below. 

Fix 2: Using .htaccess

The “.htaccess” is another essential file in the WordPress site. It can help to redirect to HTTPS and fixes several common WordPress errors. Hence, edit this file to get rid of this specific error. 

How to Edit .htaccess File? 

  • Log in to your Control Panel account and open the public_html directory. All the data is stored in a directory for the primary domain. But, if you are using multiple websites, you need to open the domain folder that you wish to modify. 
  • Search for the ‘.htaccess’ file and right-click on that to edit it. Else, you can also edit it by going to the Main navigation section. 
  • It will open a pop-up window that shows an option to disable encoding. Afterward, tap on the Edit button from the pop-up window. 
  • As a result, it will navigate to a new tab, where you will get the option to edit the .htaccess file. Next, enter the code given below: 
    • php_value upload_max_filesize 64M
    • php_value post_max_size 64M
    • php_value max_execution_time 300
    • php_value max_input_time 300
  • At last, click on the ‘Save Changes’ button to complete this procedure. 

Now, you can check if the error is resolved. 

Concluding Remarks

These are the two most recommended ways to get rid of the ‘413 request entity too large’ error. Hence, make sure that you have entered the above-mentioned fixes correctly. 

Both methods are foolproof and quite easy to implement. So, if you are a non-tech savvy person, try them when the request entity size exceeds the limit. 

Furthermore, if you have any doubts or queries regarding this topic, share that in the comment section below.