Are you having any problem while uploading any file on your website? Now you must be wondering what this error is all about and why it occurs. Here, we are going to discuss everything related to this error.
Why 413 Request Entity Too Large Error occur?
This issue generally takes place when a user tries to upload any type of file in the WordPress website. The main reason for this error is the request made by the user is too large. And the webserver is not able to process it. It happens when the webserver has a particular HTTP request size limit already set up. When the file that you want to upload is larger in size as compared to the maximum file upload limit then the webserver becomes unable to process it. And in such a scenario, you get this error message. The message displayed for error 413 request entity too large may look like this:
In most of the cases, the hosting providers have their servers configured in such a way that users can upload large media files very easily. The problem arises when you try to upload a plugin or theme files that are very large in size.
How Can You Fix 413 Request Entity Too Large Error?
The required solution for troubleshooting the error depends on the webserver you are using for the website. First of all you have to make all the required changes in order to configure the maximum HTTP request size allowance for the webserver. For example: if the Nginx 413 request entity too large error occurs then what you need to do is totally different as compared to the required action when the web server is Apache. In the case of 413 request entity too large nginx solutions are totally different. Here we have included three different methods.
Method 1 – Increase Upload File Size Limit via Functions File
The process involves a total of seven steps.
- You have to log in to your cPanel account.
- Then open the File Manager.
- For the primary domain, open the public_html directory.
- Now search for the wp-content folder and once you can locate, open this.
- After this, open the Themes folder.
- Here you can see all the active and inactive themes of your website. Open the active themes folder.
- Find the functions.php file and open it to edit.
Now, all you have to do is add the following code to the theme’s functions.php file or a site-specific plugin.
@ini_set( ‘upload_max_size’ , ’64M’ );
@ini_set( ‘post_max_size’, ’64M’);
@ini_set( ‘max_execution_time’, ‘300’ );
This way you will be able to increase the values in upload_max_size and post_max_size. And these values will become more than the size of the file that you are trying to upload. You will also have to increase the max_execution_time. This value needs to be equal to the time that you think the file will take for uploading. If you are not sure about the required values then you can give a shot at just doubling them.
Method 2 – Increase Upload File Size Limit via .htacces File
In this method, you will have to make some changes to the .htaccess file. For this you have to follow the steps that are mentioned below.
- After logging in to the cPanel, open the public_html directory.
- Find the .htaccess file and open it to edit.
All you have to do is add the following code at the bottom of the 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
It is as easy as shown.
Method 3 – Manually Upload File via FTP
The last method that you can use is, do it manually. If the 413 request entity too large error occurs only when you try to upload one particular file, then you should also try uploading that file manually. You can do this using FTP. For this, you will have to follow the steps that are mentioned below.
- Download the zip folder of the plugin and theme.
- Now you have to extract the zip file. This will create a new folder with the same name.
- After this, you can manually upload this folder to the website via FTP.
By using any of these methods, you will be able to get rid of the error 413 Request Entity Too Large.
Wrapping Up!
Although WordPress is a very popular and powerful website building platform, it is no different from other options when it comes to errors. There can be instances when you get suddenly locked out of your own website. This can be really frustrating especially when you were in the middle of something important. The 413 Request Entity Too Large Error is one of such cases.
This error usually takes place when you try to upload any type of file in your WordPress website. The main reason why this happens is, the request that you have made is too large. And the webserver is unable to process it at that time. Generally, in such cases, the web server also has a pre-set HTTP request size limit. And when you try to upload a file that is larger in size as compared to the maximum file upload limit then the webserver becomes unable to process it. And in such a scenario, you get this error message.
There are multiple available solutions for this error. It also depends on the type of access you have. In the above blog, we have tried to include all the possible solutions and their respective methods also. If you still have any issues then you can also take some help from experienced WordPress professionals.
If the need of any professional help arises then you do not have to worry. We are just a phone away from you. We have a large and dedicated team of WordPress experts who can help you with everything related to WordPress. If you have any queries about WordPress update services, WordPress security, etc. then also we can help. You can contact us on 1-866-332-O276. We are available 24×7.
Other Blog you might wish to read
- How To Fix WordPress Database Error?
- How To Fix WordPress White Screen Of Death?
- How To Fix HTTP Server Error 500 in WordPress?