我在 mac Lion 上的本地主机上运行了 wordpress。
每次我尝试安装或删除插件时,它都会要求我提供主机名、ftp 用户名和 ftp 密码。
我将我的本地主机配置为 127.0.0.1,但我从未为我的本地主机配置 ftp 用户名和密码。如何获取默认用户和密码?
我已经尝试了几乎每个用户并通过了我在 mysql、我的 osx 管理员等上的测试,但没有结果。
有什么想法吗?
最佳答案
Update 正如 Chaudhry Waqas 在评论中提到的那样,只需将 define('FS_METHOD', 'direct');
添加到 wp-config 就足够了.php
,所以请先试试这个,如果没有必要,不要更改访问权限会更安全
WARNING: only do this on your local computer, it's a huge security risk on a public installation!
I haven't tried it but as mentioned by @misterfancypants comment, changing those settings only for
wp-content/plugins/
should be sufficient
updated to incorporate this info
这个对我有用
$ cd /Users/<username>/Sites
# (wordpress = name of the directory, change as needed)
$ sudo chown -R :_www wordpress
$ sudo chmod -R g+w wordpress
然后在 wp-config.php 中添加以下内容
define('FS_METHOD', 'direct');
发现于 http://soderlind.no/running-wordpress-locally-on-mac-os-x-lion/#crayon-533a956214a8e343167867
干杯可以
关于php - WordPress 本地主机 ftp,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13120226/