为本地托管的WordPress网站安装插件需要ftp详细信息(Installing plugin for wordpress website hosted locally is asking for ftp details)

其他开发 IT屋
问 题

I am working on locally hosted wordpress installation.

When I am on windows the wordpress installation is all fine.

But whenever I move to ubuntu then my plugin installation asks for host name, ftp username and password.

It happened several times for me earlier too. Previously I went through some thread and got a solution to use localhost as host name and use my operating system username and password for ftp details. Which worked for me then.

But now it is not working for me.

And sometimes changing the file permission worked too. But again in my current case it is not working.

So, instead of trying random results, I think it will be better if I know the root cause of why this is happening and then the correct solution to troubleshoot it.

So, if any one can help me here. Thanks. enter image description here

解决方案

open wp-config.php file and add this code :

/** Setup FTP Details **/ 
define('FS_METHOD', 'direct');

本文地址:IT屋 » Installing plugin for wordpress website hosted locally is asking for ftp details

问 题

我正在进行本地托管的wordpress安装。



当我在windows上时,wordpress安装就没有问题。



但是每当我转移到Ubuntu时,我的插件安装会询问主机名,ftp用户名和密码。

早些时候我也发生过几次。以前我经历了一些线程,并得到了一个解决方案,使用localhost作为主机名,并使用我的操作系统用户名和密码来获取ftp详细信息。这对我来说很有效。



但现在它不适合我。



有时更改文件许可也起作用。但是,在我目前的情况下,它不起作用。

因此,如果我知道这是为什么的根本原因,而不是尝试随机结果,我认为它会更好发生,然后正确的解决方案来解决它。



所以,如果任何人可以帮助我在这里。谢谢。


解决方案

打开wp-config.php文件并添加这段代码:

  / **设置FTP详细信息** / 
define('FS_METHOD','direct') ;

本文地址:IT屋 » 为本地托管的WordPress网站安装插件需要ftp详细信息