Fix permissions on XAMPP, OSX

You might have run into the issue in XAMPP on OSX where you can't update Wordpress or any plugins. You'll be prompted to enter your FTP details.

"To perform the requested action, WordPress needs to access your web server."

The following should sort you out. This guide is written for XAMPP 1.8.3, but it might work on other versions.

Firstly, make sure you own everything in the XAMPP htdocs directory. To do this, first get your username. Open Terminal and type:


This will give you your username. Then, go to the XAMPP directory containing htdocs and change ownership of everything to yourself. Replace "yourusername" with the one you just received from the whoami command.

sudo chown -R yourusername /Applications/XAMPP/xamppfiles/htdocs

Next thing, you'll want to update permissions for the htdocs directory. In Finder, open /Applications/XAMPP/xamppfiles/, right click on htdocs and click on Get Info. At the bottom of the info dialog under "Sharing & Permissions", click the lock icon and enter your password. Next remove all the users/groups except "everyone" by selecting them and then clicking the minus button. Since you own the folder, your username should already be there. Make sure you have "Read & Write" privileges. Lastly, click on the gear icon and on "Apply to enclosed items".

Next, you'll want to change the Apache service to run as your user. To do this, we'll update Apache's httpd.conf file.

sudo nano /Applications/XAMPP/xamppfiles/etc/httpd.conf

In Nano, you'll want to find the following:

User daemon
Group daemon

A quick way to find this is to press CTRL+W, type in "User daemon" (without the quotes) and press enter. Replace User daemon with your User yourusername and Group daemon with Group admin.

Save the file by pressing CTRL+O and quit by pressing CTRL+X. Now, restart your Apache server with the manager-osx utility that comes with XAMPP and you should be able to update your Wordpress installations and install plugins!