I cannot find the htdocs directory anywhere on XAMPP for Mac.
Many videos on YouTube show people just clicking a button that says "Go to application folder" but on my user interface, it reads: "Go to application" which just opens the localhost page at http://localhost.
Where can I locate the htdocs directory?
From XAMPP Application window (manager-osx) click => Open Application Folder >> htdocs
Now you opened your target folder.
You can see process by image below
XAMPP Application window (manager-osx)
Open Application Folder
Application (xamppfiles) folder opened
Click on 'htdocs'
Your target folder 'htdocs' opened
Now begin your development
Open xampp application, then do the following:
go to: volumes,
click the [mount] button, and
finally click explore.
I used this line to locate and edit the permissions under xampp:
chmod 777 ~/.bitnami/stackman/machines/xampp/volumes/root/htdocs/folder
At least for macbook (os high sierra) go to terminal and type or copy and paste:
cd ~/.bitnami/stackman/machines/xampp/volumes/root/htdocs
Simple as ...
From the UI
Go->Go to Folder
then /Applications/XAMPP/htdocs
From Terminal
cd /Applications/XAMPP/htdocs
Make sure no other apache servers are running as it generates an error when you try to access it on the browser even with a different port. Go to Finder and below Device you will usually see the lampp icon. You can also open the htdocs from any of the ide or code editor by opening files or project once you locate the lampp icon. Make sure you mount the stack.
From the Finder menu, click Go->Go to Folder. Type in /Applications/XAMPP
you installed Xampp-VM (VirtualMachine), simply instead install one of the "normal" installations and everything runs fine.
Click volumes, then explore, and then that should open lampp which has htdocs in it.
for each easy and useful access you can add terminal command via editing your bash profile, here how:
open terminal -> type cd
hit enter.
then type nano .bash_profile
then add this line
alias htdocs="cd ~/.bitnami/stackman/machines/xampp/volumes/root/htdocs"
Now hit ctrl + o
then hit enter, then hit ctrl + x
Now to refresh the terminal commands type the following command
source .bash_profile
Now you can use htdocs
command each time you want to navigate htdocs folder.
For me it was in
/Users/your username/.bitnami/stackman/machines/xampp
I am using Mac Os Mojave 10.14.5
Source: Stackoverflow.com