Laravel Homestead

My quick reference for setting up and using Laravel Homestead during development.

~1 min read updated Jul 17, 2026 Laravel
  • #laravel
  • #homestead
  • #vagrant
  • #virtualbox

Laravel Homestead is the virtual machine I use for local Laravel development. It provides a consistent development environment with PHP, Composer, MySQL, Nginx, Redis, and other tools already configured.

Prerequisites

Before installing Homestead, install:

  • VirtualBox
  • Vagrant
  • Git

Install Homestead

Clone the Homestead repository.

git clone https://github.com/laravel/homestead.git ~/Homestead

Move into the directory.

cd ~/Homestead

Initialize Homestead.

bash init.sh

This creates your Homestead.yaml configuration file.

Configure Homestead

The main configuration file is:

~/Homestead/Homestead.yaml

Common settings include:

folders:
  - map: C:\Codes
    to: /home/vagrant/Codes

sites:
  - map: my-app.test
    to: /home/vagrant/Codes/my-app/public

databases:
  - my_app

Start the Virtual Machine

vagrant up

Or using my Bash alias:

hm-start

SSH into Homestead

vagrant ssh

Or:

hm-ssh

Stop Homestead

vagrant halt

Or:

hm-stop

Reload Homestead

After changing Homestead.yaml:

vagrant reload --provision

Or:

hm-reload

Laravel Commands

Once inside the VM:

php artisan serve
php artisan migrate
composer install
php artisan optimize:clear

Access phpMyAdmin

If you have phpMyAdmin installed in Homestead:

http://phpmyadmin.test

or your configured local domain.

Useful Commands

Check VM status.

vagrant status

Suspend the VM.

vagrant suspend

Resume the VM.

vagrant resume

Destroy the VM.

vagrant destroy
  • /dev/bash/my-bash-rc
  • /dev/bash/git-commands
Treat Homestead like a dedicated development computer. Keep your projects on the shared folder, do your Laravel work inside the VM, and let Vagrant handle the environment. It saves you from the timeless tradition of "works on my machine" becoming "why doesn't it work on anyone else's machine?"

Related notes