【发布时间】:2019-12-05 23:23:29
【问题描述】:
我尝试在本地主机上为 Mac 上的 wordpress 安装 Elementor 插件,但安装失败。这些是详细信息:
主机名:/Applications/XAMPP/xamppfiles/htdocs/wordpress/wp-content/plugins
Ftp 用户名:root
密码:
使用密码我收到此错误警报:
Failed to connect to FTP Server /Applications/XAMPP/xamppfiles/htdocs/wordpress/wp-content/plugins:21
没有密码我收到了这个错误提示:
Unable to connect to the filesystem. Please confirm your credentials.
我搜索了类似的案例,发现必须在代码中加入这一行:
define('FS_METHOD','direct’);
然后我收到了这条消息:
Installation failed. could not create directory.
我不熟悉代码编写,而且我是 Wordpress 新手,非常感谢您的帮助。
问候
【问题讨论】:
-
我认为你的单引号在语法上是不一样的。请使用这个->define('FS_METHOD','direct');
-
谢谢。这行代码写在哪里有关系吗?
-
是的,需要在wp-config.php最后加上这一行。
标签: wordpress macos ftp localhost elementor