本地主机上的FTP凭据
-
-
这是一个权限问题.您必须更改wp-content/uploads文件夹的所有者/组设置,也许是所有wp-content的所有者/组设置.投票并标记为可能重复:[localhost上的wordpress不允许我安装插件](http://wordpress.stackexchange.com/q/19649/12615)This is a permissions issue. You gotta change the owner/group settings of `wp-content/uploads` folder, maybe of all `wp-content`. Downvoted and flagged as Possible Duplicate: [wordpress on localhost lamp doesn't let me install plugins](http://wordpress.stackexchange.com/q/19649/12615)
- 2
- 2012-07-02
- brasofilo
-
以下答案帮助我解决了问题.我必须在Mamp Pro权限设置中将所有者和组设置为_www.The below answer helped me fix it. I had to set owner and group to _www in the Mamp Pro permission settings.
- 0
- 2012-07-02
- Johan Dahl
-
好的,但是请在发布之前搜索:)Ok, but please search before posting :)
- 0
- 2012-07-02
- brasofilo
-
我确实进行了搜索,但是由于任何原因都找不到该帖子,也许我看起来不够努力.下次会尝试做得更好:)I did search but I didn't find that post for any reason, maybe I didn't look hard enough. Will try to do better next time :)
- 1
- 2012-07-02
- Johan Dahl
-
只需将`define('FS_METHOD','direct');`添加到`wp-config.php`,它将在localhost上运行.只要确保您没有将其添加到生产版本即可.请参阅:http://codex.wordpress.org/Editing_wp-config.phpJust add `define('FS_METHOD','direct');` to `wp-config.php` and it will work on localhost. Just make sure you don't add it to production version. See: http://codex.wordpress.org/Editing_wp-config.php
- 9
- 2014-03-10
- Justin
-
define('FS_METHOD','direct');- 帮助过我.Ubuntu 14.04define('FS_METHOD','direct'); - helped me. Ubuntu 14.04
- 0
- 2014-06-17
- Tebe
-
define('FS_METHOD','direct');也为我工作.define('FS_METHOD','direct'); worked for me aswell.
- 0
- 2015-07-14
- Muhammad Tahir
-
1 个回答
- 投票数
-
- 2012-07-02
设置文件权限
在Mac OS X(Leopard)上,Apache HTTP Server在用户帐户_www下运行,该帐户属于_www组.为了允许WordPress在安装过程中配置wp-config.php,在升级过程中更新文件,以及更新.htaccess文件以获得漂亮的永久链接,请授予服务器对该文件的写入权限.
执行此操作的一种方法是将wordpress目录及其内容的所有者更改为_www.将该组保留为职员,该组是您的用户帐户所属的组,并向该组授予写权限.
$ cd /<wherever>/Sites/<thesite> $ sudo chown -R _www wordpress $ sudo chmod -R g+w wordpress
通过这种方式,WordPress目录的权限级别为775,文件的权限级别为664.文件和目录都不是世界可写的.
您可以在Mamp论坛上阅读有关此内容的更多信息: http://forum.mamp.info/viewtopic.php?f=2&t=15917
Set file permissions
On Mac OS X (Leopard), the Apache HTTP Server runs under the user account, _www which belongs to the group _www. To allow WordPress to configure wp-config.php during installation, update files during upgrades, and update the .htaccess file for pretty permalinks, give the server write permission on the files.
One way to do this is to change the owner of the wordpress directory and its contents to _www. Keep the group as staff, a group to which your user account belongs and give write permissions to the group.
$ cd /<wherever>/Sites/<thesite> $ sudo chown -R _www wordpress $ sudo chmod -R g+w wordpress
This way, the WordPress directories have a permission level of 775 and files have a permission level of 664. No file nor directory is world-writeable.
You can read more about it on mamp forum: http://forum.mamp.info/viewtopic.php?f=2&t=15917
-
谢谢.我使用Mamp Pro,并在权限框中将"所有者"和"组"设置为_www-您的答案将我引向了它.Thank you. I use Mamp Pro and in the permissions box I set the Owner and Group to _www - Your answer led me to it.
- 1
- 2012-07-02
- Johan Dahl
-
您的答案为我节省了很多时间,用于安装插件和设置wordpress.谢谢!如果您可以向我介绍有关chown和chmod以及文件特权的出色教程,则可以提供更多帮助(当前链接无效).Your answer saved me a lot of time with plugins and setting up wordpress. Thank you! If you could point me to a good tutorial about chown and chmod, and file privileges you would help even more (the current link is not working).
- 0
- 2013-07-16
- Agilius
-
很高兴为您提供帮助.看一下这个主题:http://askubuntu.com/questions/19898/whats-the-simplest-way-to-edit-and-add-files-to-var-wwwGlad it helped you. look at this topic: http://askubuntu.com/questions/19898/whats-the-simplest-way-to-edit-and-add-files-to-var-www
- 0
- 2013-07-21
- Pontus Abrahamsson
-
那很棒!That worked brilliantly!
- 0
- 2013-11-12
- realph
-
2015年,现在仍然可以解决问题!2015 and this still fixes it!
- 2
- 2015-04-22
- Rvervuurt
-
要使其在Mac上与XAMPP一起使用,请将sudo chown -R _www wordpress更改为sudo chown -R守护进程wordpressTo make it work with XAMPP on mac change sudo chown -R _www wordpress to sudo chown -R daemon wordpress
- 2
- 2016-10-26
- Mohammed Atif Sami
-
2016年12月12日,现在仍然可以解决!@Rvervuurt12-2016 and this still fixes it! @Rvervuurt
- 0
- 2016-12-01
- whoacowboy
-
10/2018并修复它:D-非常感谢!10/2018 and this fixes it :D - thanks so much!
- 0
- 2018-10-16
- nerdess
-
这为我工作,非常感谢和支持This worked for me, lots of thanks and an upvote
- 0
- 2020-01-03
- Rohit
-
01/2020效果很好01/2020 This works great
- 0
- 2020-01-08
- Clain Dsilva
我刚刚开始在本地使用Wordpress.尝试更新主题/插件时,我被要求输入FTP凭据,并且感到非常困惑……在本地工作时,我的FTP凭据到底是什么?