Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Make WordPress' plug-in installation work on OS X hosts Internet
Over the weekend, I installed a local copy of WordPress, as I was interested in testing out a number of plug-ins, and didn't want to do so on my actual blog. Install was done using the typical five-minute WordPress install, and it all seemed to work fine.

However, when I went to install a plug-in, WordPress displayed a Connection Information panel, instead of just automatically installing the plug-in, as happens on my online blogs. The Connection Information panel asks for ftp or sftp login information in order to proceed with the plug-in install.

After much searching, I found this page, which explains that the panel appears when WordPress doesn't have the rights to change the filesystem. (Experienced Unix users are now saying "well, yea, duh!")

So the fix wound up being quite simple. In Terminal, I cd'd to the WordPress folder, then ran sudo chown -R www * inside that folder. This changes the owner of the WordPress files to the user (www, which is actually _www, though I didn't specify it that way in the command) that runs the web server process.

After that, my plug-in installs went fine. This basic hint should apply to any other web application you install: if it's not behaving as expected, make sure its files are owned by the www user.
    •    
  • Currently 2.46 / 5
  You rated: 5 / 5 (13 votes cast)
 
[8,344 views]  

Make WordPress' plug-in installation work on OS X hosts | 4 comments | Create New Account
Click here to return to the 'Make WordPress' plug-in installation work on OS X hosts' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Make WordPress' plug-in installation work on OS X hosts
Authored by: Anonymous on Mar 29, '10 08:37:09AM

Explanation: Apache is run by the user "www", so to modify files, user "www" must have privileges. More of a "doh!" than a hint...



[ Reply to This | # ]
Make WordPress' plug-in installation work on OS X hosts
Authored by: simbalala on Mar 29, '10 05:33:27PM

I guess people experienced enough to be using a versioning system like Subversion will already know this but "chowning" all the files and folders in a working copy to www will play havoc with the versioning system. It will no longer be able to write the files and folders it needs to write.

Better to take more careful approaches if you're using versioning.



[ Reply to This | # ]
Make WordPress' plug-in installation work on OS X hosts
Authored by: simbalala on Jun 17, '10 08:29:40AM

A better solution may be to temporarily change the webserver (Apache) user to your own user name.

For 10.5 (maybe others) the httpd.conf file is in...

private/etc/apache2

Simply change the: User www

to your user name. Restart Apache by turning web sharing off then on, then run the installers or whatever you need the web app to do then change the user name back.

Much simpler and cleaner solution in my opinion and less likely to cause other problems.



[ Reply to This | # ]
Chown local files and then uploading them to remote server
Authored by: sergiozambrano on May 26, '10 10:21:41PM

How is this going to affect my remote site once I upload the files?

Is that ownership going to be changed automatically by the simple action of uploading them to that server?

Is that ownership going to be kept and the remote version won't work?

Is that ownership going to be overwritten by remote's once I GET a file back to the local?

Thanks



[ Reply to This | # ]