Home » WordPress

WordPress后台升级免输入FTP帐号

5 07月 2010 Views: No Comment Tags:

新版的WordPress自带了插件自动升级的功能。每次安装的插件有了新版本,只要点一个链接,就自动完成下载、解压、禁用插件、升级、重新启用这一系列步骤。常方便。但有些空间选择升级时会提示需要主机的FTP用户名和密码。

这个blog安装在linux系统上,第一感觉可能是权限的问题,反正是内部的服务器,随便折腾,就都设置成777。结果还是不行,就仔细地跟进去查了一下,发现问题在一个叫做“get_filesystem_method”的函数上。找到这样一个解释:

(FTP) it only uses this when it detects that files it creates have the wrong owner name

一下得到了提醒,可能是因为跑PHP进程的用户名和WP文件夹的所有者不同。于是用chown命令更改了文件所有者,命令用法如下:

chown -R www *

就是把目录下所有文件和文件夹的所有者改成叫做www的用户。这样再去尝试WP的自动升级,一键升级就能顺利进行了。

原创文章如转载,请注明:转载自Xixis Blog [ http://www.xixis.net/ ]
本文链接地址:http://www.xixis.net/archives/background-free-importation-of-wordpress-upgrade-ftp-account.html

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.