What causes WordPress 413 Request Entity Too Large error?
When the attempted upload exceeds theWordPress websiteThis error occurs when the maximum file upload limit of the
The web server will not be able to upload files and will see "413 Requesting entity too large"Error message.
![图片[1]-如何修复 WordPress 中的 413 请求实体太大错误-光子波动网 | WordPress教程、Elementor教程与故障修复](https://www.361sale.com/wp-content/uploads/2024/08/2024082201553332.png)
Typically, most WordPress users configure their server after they buy it so that they can easily upload large images and other media later.
However, sometimes these settings are not high enough to upload large theme or plugin files.
The server configuration can also prevent you from uploading large files to the media library. In this case, you will see a different message specifying that the file size exceeds the maximum allowed limit.
![图片[2]-如何修复 WordPress 中的 413 请求实体太大错误-光子波动网 | WordPress教程、Elementor教程与故障修复](https://www.361sale.com/wp-content/uploads/2024/08/2024082201580879.png)
Let's see what we can do to fix WordPress."413 Requesting entity too large"Error.
Fix 413 request entity too large error in WordPress
There are several ways to fix the Request Entity Too Large error in WordPress. I'll go over these methods slowly, so you can try what works best for you.
Method 1: Use WPCode to increase the upload file size limit (recommended)
You can directly edit the theme of thefunctions.php fileThe first thing you need to do is to backup your website. However, if you are a novice without a certain technical basis, we do not recommend that you use this method, because this method of a small error may also lead to the collapse of the site, so the site backup is super important.
We recommend the use ofWPCodeIt is the best WordPress code snippet plugin. It is the best WordPress snippet plugin that allows to increase the upload file size limit without having to edit the functions.php file directly.
First, install and activate the free WPCode plugin.
Next, go to the WordPress admin sidebar in the"Code snippet" ""Add code snippet""Then, hover over the "Add your custom code (new code snippet)" option and click ". Then, hover over the "Add your custom code (new code snippet)" option and click "Using code snippetsSegment" button.
![图片[3]-如何修复 WordPress 中的 413 请求实体太大错误-光子波动网 | WordPress教程、Elementor教程与故障修复](https://www.361sale.com/wp-content/uploads/2024/08/2024082202125058.png)
The title of the code snippet can be entered at the top to find it easily.
Now it needs to be in "Code Preview" box, enter the following code:
@ini_set( 'upload_max_size' , '120M' );
@ini_set( 'post_max_size', '120M' );
@ini_set( 'max_execution_time', '300' );
Also in "code type"The drop-down menu selects the"PHP Snippet".
![图片[4]-如何修复 WordPress 中的 413 请求实体太大错误-光子波动网 | WordPress教程、Elementor教程与故障修复](https://www.361sale.com/wp-content/uploads/2024/08/2024082202222471.png)
upload_max_sizeIt is possible to increase the value of andpost_max_sizeMake it larger than the size of the file you uploaded.
It is also necessary to placemax_execution_timeThe time it takes to upload a file increases to the time you think it takes to upload a file. If you are not sure, then try doubling this value.
Finally, at the top of the page, remove the code snippet from the "Inactive" switches to "active".and then click"Updating". This will execute the code snippet on your WordPress site.
![图片[5]-如何修复 WordPress 中的 413 请求实体太大错误-光子波动网 | WordPress教程、Elementor教程与故障修复](https://www.361sale.com/wp-content/uploads/2024/08/2024082202240583.png)
Method 2: Add upload file size limit via .htaccess file
For this method, access and edit the .htaccess file using an FTP client or the File Manager application in the Control Panel.Note that if you have a NGINX server instead of an Apache server, you will not be able to access and modify this file.
Then, simply add the following line of code to the bottom of the .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
You can change each value to be larger than the size of the file to be uploaded. Then.Save the .htaccess file and re-upload it to the serverThe
Method 3: Manually uploading files via FTP
The last method isManually uploading files via FTP. If you only upload aFor specific documentsA 413 error occurs, then consider uploading manually via FTP.
If you are uploading a WordPress theme, see the section on "WordPress theme installation tutorial: easy to get started, make your website new!"Part.
Link to this article:https://www.361sale.com/en/17290/The article is copyrighted and must be reproduced with attribution.
















![表情[wozuimei]-光子波动网 | WordPress教程、Elementor教程与故障修复](https://www.361sale.com/wp-content/themes/zibll/img/smilies/wozuimei.gif)
![表情[baoquan]-光子波动网 | WordPress教程、Elementor教程与故障修复](https://www.361sale.com/wp-content/themes/zibll/img/smilies/baoquan.gif)

No comments