wordpress修复插件_如何修复WordPress中的413请求实体太大错误

wordpress修复插件

Are you seeing the 413 Request entity too large error in WordPress? This error usually occurs when you are trying to upload a theme or plugin file in WordPress. In this article, we will show you how to easily fix the 413: request entity too large error in WordPress.

您是否在WordPress中看到413请求实体太大错误? 当您尝试在WordPress中上载主题或插件文件时,通常会发生此错误。 在本文中,我们将向您展示如何轻松修复WordPress中的413:请求实体太大错误。

WordPress 413 error - Request entity too large
是什么导致WordPress 413请求实体错误太大? (What Causes WordPress 413 Request Entity Too Large Error?)

This error usually happens when you are trying to upload a file that exceeds the maximum file upload limit on your WordPress site.

当您尝试上传的文件超出WordPress网站上的最大文件上传限制时,通常会发生此错误。

Your web server will fail to upload the file, and you will see the 413 request entity too large error page.

您的网络服务器将无法上传文件,并且您将看到413请求实体太大错误页面。

413 request entity too large error example

Normally, most WordPress hosting companies have their servers configured, so that WordPress users can easily upload large images and other media.

通常,大多数WordPress托管公司都配置了服务器,以便WordPress用户可以轻松上传大图像和其他媒体。

However, sometimes this setting is not high enough to upload large theme or plugin files.

但是,有时此设置不够高,无法上传大型主题或插件文件。

It would also stop you from uploading large files in media library. In that case, you will see a different message, clearly stating that the file size exceeds maximum allowed limit.

这也将阻止您上载媒体库中的大文件。 在这种情况下,您将看到不同的消息,明确指出文件大小超出了允许的最大限制。

File size exceeds maximum upload size limit

That being said, let’s take a look at how to fix the the WordPress 413 request entity too large error.

话虽如此,让我们看一下如何解决WordPress 413请求实体太大的错误。

在WordPress中修复413请求实体太大错误 (Fixing 413 Request Entity Too Large Error in WordPress)

There are multiple ways to fix the request entity too large error in WordPress. We will cover all these methods, and you can try the one that works best for you.

有多种方法可以解决WordPress中的请求实体太大错误。 我们将介绍所有这些方法,您可以尝试最适合您的一种方法。

Method 1. Increase Upload File Size Limit via Functions File

方法1.通过功能文件增加上传文件的大小限制

Simply add the following code to your theme’s functions.php file or a site-specific plugin.

只需将以下代码添加到主题的functions.php文件或特定站点的插件中


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

You can increase the values in upload_max_size and post_max_size to be more than the file you are trying to upload. You will also need to increase the max_execution_time to the time you think it would take for the file to upload. If you are unsure, then you can try doubling this value.

您可以增加upload_max_size和post_max_size中的值,使其大于您尝试上传的文件。 您还需要将max_execution_time增加到您认为文件上传所需的时间。 如果不确定,则可以尝试将该值加倍。

Method 2. Increase Upload File Size Limit via .htacces File

方法2.通过.htacces文件增加上载文件大小限制

For this method, you will need to edit the .htaccess file and add the following code at the bottom:

对于此方法,您将需要编辑.htaccess文件,并在底部添加以下代码:


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

To learn more about increasing file upload size limit, see our guide on how to increase the maximum file upload size in WordPress.

要了解有关增加文件上传大小限制的更多信息,请参阅有关如何在WordPress中增加最大文件上传大小的指南。

Method 3. Manually Upload File via FTP

方法3。通过FTP手动上传文件

If the 413 error only occurs when you are uploading one particular file, then you may want to consider uploading the file manually via FTP.

如果仅在上传一个特定文件时发生413错误,则您可能需要考虑通过FTP手动上传文件。

If you are trying to upload a WordPress theme, then see our guide on how to install a WordPress theme and jump to the ‘Installing a WordPress theme using FTP’ section.

如果您要上载WordPress主题,请参阅我们的指南以了解如何安装WordPress主题,并跳至“使用FTP安装WordPress主题”部分。

If you are trying to upload a plugin, then see our guide how to install a WordPress plugin and jump to ‘Manually install a WordPress plugin using FTP’ section.

如果您尝试上传插件,请参阅我们的指南如何安装WordPress插件,并跳至“使用FTP手动安装WordPress插件”部分。

For other files, see our guide on how to manually upload WordPress files using FTP.

对于其他文件,请参阅有关如何使用FTP手动上传WordPress文件的指南。

We hope this article helped you learn how to fix the WordPress 413 request entity too large error. You may also want to see our list of the most common WordPress errors and how to fix them.

我们希望本文能帮助您学习如何修复WordPress 413请求实体太大错误。 您可能还希望查看我们最常见的WordPress错误列表以及如何修复它们。

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

如果您喜欢这篇文章,请订阅我们的YouTube频道 WordPress视频教程。 您也可以在TwitterFacebook上找到我们。

翻译自: https://www.wpbeginner.com/wp-tutorials/how-to-fix-the-413-request-entity-too-large-error-in-wordpress/

wordpress修复插件

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值