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 :)


展开阅读全文

没有更多推荐了,返回首页