wordpress修复插件_如何修复WordPress中的“缺少临时文件夹”错误

wordpress修复插件

Are you seeing ‘Missing a temporary folder’ error on your WordPress site? This error makes it impossible to upload images, update themes and plugins, or update WordPress core. In this article, we will show you how to easily fix “Missing a temporary folder” error in WordPress.

您是否在WordPress网站上看到“缺少临时文件夹”错误? 此错误使得无法上传图像,更新主题和插件或更新WordPress核心。 在本文中,我们将向您展示如何轻松修复WordPress中的“缺少临时文件夹”错误。

How to fix 'Missing temporary folder' error in WordPress
是什么原因导致WordPress中的“缺少临时文件夹”错误? (What Causes The ‘Missing a Temporary Folder’ Error in WordPress?)

This error is caused by incorrect PHP settings on your WordPress hosting environment. There is a specific PHP setting that defines a temporary folder to be used by apps like WordPress to temporarily store data before saving it to the desired location.

此错误是由WordPress托管环境上错误PHP设置引起的。 有一个特定PHP设置定义了一个临时文件夹,供WordPress之类的应用程序使用,用于在将数据保存到所需位置之前临时存储数据。

WordPress needs access to this temporary folder when you upload an image, install or update a theme or plugin, or update WordPress core.

当您上传图像,安装或更新主题或插件或更新WordPress核心时,WordPress需要访问此临时文件夹。

If the location of this folder is not defined in your server’s PHP configuration, then WordPress will be unable to do any of these things and will show you ‘Missing a temporary folder’ error.

如果此文件夹的位置未在服务器PHP配置中定义,则WordPress将无法执行任何这些操作,并且会显示“缺少临时文件夹”错误。

Missing temporary folder error

Having said that, let’s see how to easily fix the ‘Missing a temporary folder’ error in WordPress.

话虽如此,让我们看看如何轻松修复WordPress中的“缺少临时文件夹”错误。

修复WordPress中丢失的临时文件夹错误 (Fix Missing Temporary Folder Error in WordPress)

For this tutorial, you will need to edit wp-config.php file in WordPress. If you haven’t done this before, then please see our guide on how to edit wp-config.php file in WordPress.

对于本教程,您将需要在WordPress中编辑wp-config.php文件。 如果您之前没有做过此操作,请参阅有关如何在WordPress中编辑wp-config.php文件的指南。

First, you will need to connect to your website using an FTP client or File Manager in cPanel dashboard of your hosting account.

首先,您需要使用托管帐户的cPanel仪表板中的FTP客户端或文件管理器连接到您的网站。

Next, you will need to locate the wp-config.php file and edit it.

接下来,您将需要找到wp-config.php文件并进行编辑。

Editing wp-config.php file using an FTP client

You need to paste this code to the file just before the line that says ‘That’s all, stop editing! Happy blogging’.

您需要将此代码粘贴到文件上,即“就这样,停止编辑! 祝您博客愉快”


define('WP_TEMP_DIR', dirname(__FILE__) . '/wp-content/temp/');

Save your changes and upload the wp-config.php file back to your website.

保存您的更改,并将wp-config.php文件上传回您的网站。

Next, you need to go to /wp-content/ folder and create a new folder inside it. You need to name this new folder temp.

接下来,您需要转到/wp-content/文件夹并在其中创建一个新文件夹。 您需要将此新文件夹命名为temp

Creating temp folder

That’s all, you can now visit your WordPress admin area and try uploading an image.

就是这样,您现在可以访问WordPress管理区域并尝试上传图像。

故障排除 (Troubleshooting)

If this method doesn’t work, then check the directory permissions for your wp-content folder.

如果此方法不起作用,请检查wp-content文件夹的目录权限

Note: This error is caused by poorly configured hosting environment. The solution described above is just a workaround. You should still ask your hosting provider to fix this. If they don’t, then you should switch to one of these top WordPress hosting companies.

注意:此错误是由配置不正确的托管环境引起的。 上述解决方案仅是一种解决方法。 您仍然应该要求托管服务提供商解决此问题。 如果他们没有,那么您应该切换到这些顶级WordPress托管公司之一。

We hope this article helped you fix the ‘Missing a temporary folder’ error in WordPress. You may also want to bookmark our ultimate list of the most common WordPress errors and how to fix them.

我们希望本文能帮助您解决WordPress中的“缺少临时文件夹”错误。 您可能还想将最常见的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-missing-a-temporary-folder-error-in-wordpress/

wordpress修复插件

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值