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?

  • 2
    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, 2012 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, 2012 at 9:01
  • Ok, but please search before posting :)
    – brasofilo
    Jul 2, 2012 at 9:09
  • 1
    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, 2012 at 9:41
  • 9
    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, 2014 at 21:19

1 Answer 1


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

  • 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, 2012 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, 2013 at 11:48
  • Glad it helped you. look at this topic: askubuntu.com/questions/19898/… Jul 21, 2013 at 10:43
  • 2
    2015 and this still fixes it!
    – Rvervuurt
    Apr 22, 2015 at 12:13
  • 2
    To make it work with XAMPP on mac change sudo chown -R _www wordpress to sudo chown -R daemon wordpress Oct 26, 2016 at 17:36

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