wordpress文件权限_如何修复WordPress中的文件和文件夹权限错误

wordpress文件权限

Are you trying to fix the file and folder permissions error in WordPress? Incorrect file and folder permissions can cause errors on your WordPress site during upload. In this article, we will show you how to easily fix file and folder permissions error in WordPress.

您是否要修复WordPress中的文件和文件夹权限错误? 错误的文件和文件夹权限可能会导致在上传过程中WordPress网站上出现错误。 在本文中,我们将向您展示如何轻松修复WordPress中的文件和文件夹权限错误。

Fix file and folder permissions in WordPress
文件和文件夹权限如何在WordPress中工作? (How File and Folder Permissions Work in WordPress?)

Your self-hosted WordPress site lives on a computer run by your WordPress hosting company. This computer acts as a server and uses a special software (usually Apache) to manage your files and serve them to browsers.

您的自托管WordPress网站位于由WordPress托管公司运行的计算机上。 该计算机充当服务器,并使用特殊的软件(通常为Apache )来管理文件并将其提供给浏览器。

File and folder permissions tell the server who can read, run, or modify files hosted on your account. WordPress needs permissions to manage files and create folders on the server.

文件和文件夹权限告诉服务器谁可以读取,运行或修改您帐户上托管的文件。 WordPress需要权限来管理文件和在服务器上创建文件夹。

Incorrect file permissions can block WordPress from creating folders, upload images, or run some scripts. Incorrect permissions can also compromise security of your WordPress site.

不正确的文件权限可能会阻止WordPress创建文件夹, 上传图像或运行某些脚本。 不正确的权限也会损害WordPress网站的安全性

In most cases, WordPress will try to warn you that it can’t edit a file, create a folder, or cannot write to disk. However, sometimes you may not see any proper error messages.

在大多数情况下,WordPress会尝试警告您不能编辑文件,创建文件夹或无法写入磁盘。 但是,有时您可能看不到任何正确的错误消息。

在WordPress中正确的文件和文件夹权限 (Correct File and Folder Permissions in WordPress)

The correct set of file and folder permissions allows WordPress to create folders and files. The following settings are recommended for most users.

正确的文件和文件夹权限集允许WordPress创建文件夹和文件。 建议大多数用户使用以下设置。

755 for all folders and sub-folders.
644 for all files.

所有文件夹和子文件夹为755。
所有文件均为644。

Let’s take a look at how to easily fix file and folder permissions in WordPress.

让我们看一下如何轻松修复WordPress中的文件和文件夹权限。

使用FTP修复WordPress中的文件和文件夹权限 (Fix File and Folder Permissions in WordPress Using FTP)

First, you will need to connect to your WordPress site using an FTP client. Once connected go to the root folder of your WordPress site.

首先,您需要使用FTP客户端连接到WordPress网站。 连接后,转到WordPress网站的根文件夹。

After that select all folders in root directory and then right click to select ‘File Permissions’.

之后,选择根目录中的所有文件夹,然后右键单击以选择“文件权限”。

File permissions in FTP

This will bring up the file permissions dialog box.

这将弹出文件权限对话框。

Now you need to enter 755 in the numeric value field. After that you need to click on ‘Recurse into subdirectories’ checkbox and then select ‘Apply to directories only’ option.

现在,您需要在数值字段中输入755 。 之后,您需要单击“递归到子目录”复选框,然后选择“仅应用于目录”选项。

Fixing folder permissions in WordPress

Click on the OK button to continue. Your FTP client will start setting file permissions to folders and sub-folders. You will need to wait for it to finish.

单击确定按钮继续。 您的FTP客户端将开始为文件夹和子文件夹设置文件权限。 您将需要等待它完成。

Next, you need to select all files and folders in the root folder of your WordPress site and then right-click to select file permissions.

接下来,您需要在WordPress网站的根文件夹中选择所有文件和文件夹,然后右键单击以选择文件权限。

Setting permissions for all files

The file permissions dialog box would appear.

出现文件权限对话框。

This time you need to enter 644 in numeric value. After that you need to click on ‘Recurse into subdirectories’ checkbox and then select ‘Apply to files only’ option.

这次您需要输入数字644 。 之后,您需要单击“递归到子目录”复选框,然后选择“仅应用于文件”选项。

Setting permissions for files in WordPress

Click on OK to continue.

单击确定继续。

Your FTP client will now start setting file permission to all files on your WordPress site.

您的FTP客户端现在将开始为WordPress网站上的所有文件设置文件权限。

We hope this article helped you fix file and folder permissions in WordPress. You may also want to see our guide on how to fix common WordPress errors.

我们希望本文能帮助您修复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/beginners-guide/how-to-fix-file-and-folder-permissions-error-in-wordpress/

wordpress文件权限

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值