I've just installed XAMPP on Mac OSX and when trying to install a theme or plugin in WP admin, I'm getting this screen. I've never gotten this on my shared hosting account. how to get rid of it on localhost?

WordPress challenge when installing new plugin

enter image description here

  • This answer solves my question but I was unable to find it in time to prevent severe brain injury. For the sake of Google / SERP I'm adding the actual text of the error message:Connection Information To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host. Mar 3, 2015 at 0:56

5 Answers 5


Have you tried updating the permissions for your WordPress files to 755 or 777?


Thanks to @anu in the comments (~/Sites assumes you put websites are in the Mac's default website directory):

cd ~/Sites
sudo chmod -R 777 *

I just checked my httpd.conf file, which has the path /Applications/XAMPP/etc/httpd.conf and here is what I found starting on line 127 so I think @gabrielk's answer is probably what you need.

# running httpd, as with most system services.
User mikeschinkel
Group everyone



If you were to decide to use the built-in Apache a tool you should definitely consider getting for the Mac is VirtualHostX. It manages all your Apache and your hosts files for setting up local "domains". It's one of my favorite tools on the Mac:

VirtualHostX Screenshot

  • @Mike: Nope. Do you know how to do that on a Mac localhost setup?
    – Scott B
    Mar 16, 2011 at 22:16
  • 1
    cd [directory where your WP files are];sudo chmod -R 777 *
    – anu
    Mar 17, 2011 at 14:51
  • @Scott B - You are too kind. Glad I could help. You should give @gabrielk a vote up too. Mar 18, 2011 at 4:48
  • This is maddeningly frustrating!!! I've used Get Info to change permissions on the http.conf file so that admin, system and everyone has "Read & Write" Privelege. BUT, when I try to save the file I get "The document 'http.conf' could not be saved." ARGGGGGGGGHHHHHHH.
    – Scott B
    Mar 20, 2011 at 14:51
  • Update: Finally able to figure out how to get terminal working to change as per @gabrielk's suggestion. Unfortunately, Still get FTP challenge as in screenshot.
    – Scott B
    Mar 20, 2011 at 15:00
  1. Open wp-config.php

Now the first thing you need to do is to open the wp-config.php file from your WordPress root folder (you may access this file from your WordPress installer folder). From the installation folder, the file is located at wordpress/wp-config.php 2. Insert FS_METHOD

Paste the following code to your wp-config.php file, preferably just below every other line of code.


FS Method 3. Save and upload

When you have already pasted the one-line code, you can proceed to upload the file to your WordPress root folder on your server, and it should work right away. Uploading can be done directly from your host control panel. Conclusion

The FTP issue normally happens when you are on shared hosting and when WordPress is having a conflict with permissions and ownerships. With this ‘direct’ method implemented, you will be able to update or upgrade your WordPress and plugins installations to newer versions without having to provide any FTP details.

  • its used by me and it work fine and install themes, plugins Dec 9, 2013 at 11:55
  • When I did this, it successfully attempted file writing (it didn't ask me for my credentials anymore) but the file writes failed and the page gave an error. I also had to change ownership of all files to _www as instructed above: chown -R _www: myWPSite Mar 3, 2015 at 0:54

Your webserver runs under a user account, on OS X 10.6 that user is _www and the group is also _www

WordPress needs the owner and/or group of the web server to match the owner and/or group of the files -- which is your user account.

First, open your Terminal. Find your username and group by typing: id You should see output like:

uid=503(gabrielk) gid=20(staff) groups=20(staff),[a bunch of others]

Note the first two values in parenthesis. This is your user and group.

Next editing your Apache config and set it to run as your user & group. In the Terminal type: sudo nano /Applications/XAMPP/etc/httpd.conf

(In a default OS X install not running XAMPP, you would type: sudo nano /etc/apache2/httpd.conf)

Find this section (this is from the default httpd.conf in OS X, the one in XAMPP may be slightly different but the config values will be the same):

# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
User _www
Group _www

Change the user and group to match yours. In my case:

# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
User gabrielk
Group staff

Save, then restart Apache. In a default OS X install that would be: sudo apachectl restart

WordPress should not give you any trouble after that. Note, however, that you may need to repeat these steps next time you update OS X.

  • this is a XAMPP install - so I don't think this applies
    – anu
    Mar 17, 2011 at 14:50
  • managed to change the values to my name and group (scottb/staff) and saved values back to http.conf file. However, I'm still getting the FTP challenge when attempting to install plugins/themes. Any thoughts of what to try next? This is a default MACOSX install on a new iMac.
    – Scott B
    Mar 20, 2011 at 15:02
  • 1
    Yikes, late responding to this, sorry. Make sure your account is the owner of the files. As long as 1) your username is the owner of the file, 2) the file has user write permissions (755), and 3) Apache is running with your account, there should be no problem.
    – gabrielk
    Mar 31, 2011 at 18:09

Another solution is to simply chown the entire wordpress install to the user that apache is running as:

chown -R _www: myWPSite

Then you can do your automatic updates, and if necessary, chown it back to the previous owner.


In order to fix this, all that you need to do is provide necessary permissions for WordPress.

Run the following command in your Terminal / Putty / Commandline Prompt after connecting to your server via SSH:

sudo chown -R apache:apache /var/www/html

Checkout the below article for full details: How to fix the infamous issue of WordPress asking for FTP Credentials for Installing Plugins / Themes ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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