Skip to content

Instantly share code, notes, and snippets.

@kengitahi
Forked from yozzi/solved.txt
Created July 25, 2018 22:49
Show Gist options
  • Save kengitahi/5779097af0dc937bfef6321c108b8777 to your computer and use it in GitHub Desktop.
Save kengitahi/5779097af0dc937bfef6321c108b8777 to your computer and use it in GitHub Desktop.
SOLVED! WORDPRESS ASKING FOR LOCAL FTP CREDENTIALS ON XAMPP
SOLVED! WORDPRESS ASKING FOR LOCAL FTP CREDENTIALS ON XAMPP
A few developers were asking why their localhost instances of WordPress were asking for FTP credentials when trying to install new plugins and themes. If you’re getting the dreaded “Please enter your FTP credentials” page and you’re running XAMPP for your local WP development environment, do not follow the popular StackOverflow answer that tells you to chown your wordpress folder to _www. Read more for the real fix.
There’s a Stackoverflow page that tells you to chown your local environment to www, but according to the <a href=“http://www.apachefriends.org/en/xampp-macosx.html” target=“blank”>recent XAMPP documentation, Apache is running as user ‘daemon.’
So the fix is to go into your Terminal and cd to your local directory. If you develop a lot of wordpress stuff at the same time, you can just chown your htdocs directory (remember that you should never use XAMPP as a production environment, which means you should never follow these ideas for live sites). Here’s what you want to do:
cd /Applications/XAMPP/xamppfiles/
This will get you to the XAMPP file directory. Now we’re going to modify your htdocs directory:
sudo chown -R daemon htdocs
Enter your root password when prompted, then finish it out with a chmod call:
sudo chmod -R g+w htdocs
And you’re done!
@kengitahi
Copy link
Author

kengitahi commented Jul 25, 2018

If you are on ubuntu do this

cd /opt/lampp

Then

sudo chown -R daemon htdocs

Enter your root password when prompted, then finish it out with a chmod call:

sudo chmod -R g+w htdocs

And you’re done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment