Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Possible Duplicate:
wordpress on localhost lamp doesn't let me install plugins

I just started working locally with Wordpress. Trying to update theme/plugins I get asked for my FTP credentials and I get really confused...what the heck is my FTP credentials when working locally?

share|improve this question
1  
This is a permissions issue. You gotta change the owner/group settings of wp-content/uploads folder, maybe of all wp-content. Downvoted and flagged as Possible Duplicate: wordpress on localhost lamp doesn't let me install plugins –  brasofilo Jul 2 '12 at 8:56
    
The below answer helped me fix it. I had to set owner and group to _www in the Mamp Pro permission settings. –  Johan Dahl Jul 2 '12 at 9:01
    
Ok, but please search before posting :) –  brasofilo Jul 2 '12 at 9:09
    
I did search but I didn't find that post for any reason, maybe I didn't look hard enough. Will try to do better next time :) –  Johan Dahl Jul 2 '12 at 9:41
1  
Just add define('FS_METHOD','direct'); to wp-config.php and it will work on localhost. Just make sure you don't add it to production version. See: codex.wordpress.org/Editing_wp-config.php –  Justin Mar 10 at 21:19
add comment

marked as duplicate by Bainternet Jul 2 '12 at 9:04

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer

up vote 10 down vote accepted

Set file permissions

On Mac OS X (Leopard), the Apache HTTP Server runs under the user account, _www which belongs to the group _www. To allow WordPress to configure wp-config.php during installation, update files during upgrades, and update the .htaccess file for pretty permalinks, give the server write permission on the files.

One way to do this is to change the owner of the wordpress directory and its contents to _www. Keep the group as staff, a group to which your user account belongs and give write permissions to the group.

$ cd /<wherever>/Sites/<thesite>
$ sudo chown -R _www wordpress
$ sudo chmod -R g+w wordpress

This way, the WordPress directories have a permission level of 775 and files have a permission level of 664. No file nor directory is world-writeable.

You can read more about it on mamp forum: http://forum.mamp.info/viewtopic.php?f=2&t=15917

share|improve this answer
1  
Thank you. I use Mamp Pro and in the permissions box I set the Owner and Group to _www - Your answer led me to it. –  Johan Dahl Jul 2 '12 at 8:59
    
Your answer saved me a lot of time with plugins and setting up wordpress. Thank you! If you could point me to a good tutorial about chown and chmod, and file privileges you would help even more (the current link is not working). –  Agilius Jul 16 '13 at 11:48
    
Glad it helped you. look at this topic: askubuntu.com/questions/19898/… –  Pontus Abrahamsson Jul 21 '13 at 10:43
    
That worked brilliantly! –  realph Nov 12 '13 at 17:27
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.