Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

elpete's avatar

There is no Homestead directory to cd into. You specify the folders you want to share in your Homestead.yaml file.

Check out your Homestead.yaml file by typing homestead edit. I'll paste mine as an example:

---
ip: "192.168.10.10"
memory: 2048
cpus: 1

authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

folders:
    - map: ~/Code
      to: /home/vagrant/Code

sites:
    - map: save-the-date.dev
      to: /home/vagrant/Code/save-the-date/public
    
databases:
    - save_the_date

variables:
    - key: APP_ENV
      value: local

Do you see the folders option? That's where you specify shared folders. map: is on your local machine; to: is on the vagrant box. Also, notice the sites option. That maps URL's to folders on your vagrant box. Homestead will automatically set up the site with an Nginx instance. Just make sure to add whatever name you specify in the map: to your /etc/hosts file so you can access it. The IP address you will use in your hosts file is at the top of the Homestead.yaml file.

You can find all of this and more in the docs, like @sitesense mentioned. Check them out for sure. They're great!

bashy's avatar

@spardicurus Not sure if you read the replies in the thread but the file is empty and there's other issues apart from that.

elpete's avatar

Hi, @bashy. I did read the thread. It looked like the file being blank was the main issue. That's why I was including an example one. :-)

bashy's avatar

@spardicurus Yeah it was just your comment about editing the file when we'd already gone over it :)

Surely it would be best to solve that problem first as you shouldn't have to enter it all in!

1 like
Previous

Please or to participate in this conversation.