MAC下wordpress需要FTP安装插件的问题

转自:http://www.messaliberty.com/2010/04/how-to-fix-wordpress-automatic-upgrades-and-plugin-installs-on-xampp/


How to fix WordPress automatic upgrades and plugin installs on XAMPP

If you’ve ever had problems with WordPress automatic updates on a local install of XAMPP this should fix it (note that I’ve tested it on OSX but it should work for Windows/Linux but the details will be different).  For a long time I just did the updates/installs by manually installing because the automatic upgrades never worked or it would ask for my ftp details.  And no matter what ftp details I entered it would never connect.  Same for plugin installs or updates.

Turns out that it has nothing to do with ftp settings, it was a simple file permissions conflict.  XAMPP was running its local Apache as user ‘nobody’ while the files on my hard disk were owned by my local user ‘ian’.  When WordPress came across this conflict it fell back to ftp mode but since it is a local install, that didn’t work.

[Just to clarify following Philip's comments below, because it is a permissions issue, the owner of the files and the user you set should match]

So what to do? The easiest thing to do is to edit the XAMPP apache config file to run it as your local user.  To find out your local user name, just launch terminal and in your home directory run:

1
ls -al

then edit the config file. If you are comfortable with using vi type this:

1
sudo vi /Applications/XAMPP/etc/httpd.conf

If not you can use the TextEdit app, you need to type this into the terminal:

1
sudo open -e “/Applications/XAMPP/etc/httpd.conf”

look for these lines:

1
2
User nobody
Group admin

and change them to:

1
2
User yourusername
Group staff

You’ll have to restart XAMPP’s Apache and if you attempted automatic updates before and failed, you’ll have to delete the upgrades folder inside wp-content.

Hope this helps other WordPress designers and developers using XAMPP. Please leave a comment or have a look at messa.tv if it did :)


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值