简体   繁体   English

Wordpress FTP无法在我的Linode VPS上运行

[英]Wordpress FTP not working on my Linode VPS

I'm having trouble updating my plugins through wp-admin on my Linode VPS. 我在Linode VPS上通过wp-admin更新我的插件时遇到问题。 I can connect via FTP client and write to any directory but when I try the same username / pass but with the hostname set to localhost in wp-admin, I get: 我可以通过FTP客户端连接并写入任何目录但是当我尝试使用相同的用户名/通过但是在wp-admin中将主机名设置为localhost时,我得到:

 ERROR: There was an error connecting to the server, Please verify the settings are correct.

Is there a setting I'm overlooking? 有一个我忽略的环境吗?

If WordPress is asking you for FTP information, you need to look at your file ownership & permissions. 如果WordPress要求您提供FTP信息,则需要查看您的文件所有权和权限。 Your WordPress files should be owned by the same user as your web server (most likely www-data) and that user needs to have permission to write to those files. 您的WordPress文件应该由与Web服务器相同的用户拥有(很可能是www-data),并且该用户需要具有写入这些文件的权限。 If those are set correctly, WordPress will be able to access the filesystem directly and not need to go through FTP for any installs or upgrades. 如果设置正确,WordPress将能够直接访问文件系统,无需通过FTP进行任何安装或升级。

I'm working on a plugin called Upgrade First Aid which should help with troubleshooting these sorts of issues in WordPress 3.6 and higher. 我正在开发一个名为Upgrade First Aid的插件,它可以帮助解决WordPress 3.6及更高版本中的这些问题。 You can download the latest version here and upload it to your site. 您可以在此处下载最新版本并将其上传到您的网站。 Activate it, and it will add a new menu item under "tools" to check your file permissions. 激活它,它将在“工具”下添加一个新菜单项来检查您的文件权限。

You need to modify the ownership. 您需要修改所有权。 Try this command: 试试这个命令:

chown -R www-data ~/public/example.com/public

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM