Getting started with Scotch Box is a breeze. We'll cover everything, but chances are you've probably already done some of these things.
Just clone the repo and run vagrant up.
git clone https://github.com/scotch-io/scotch-box my-project cd my-project vagrant up
"I'm a Total Noob, Help Me" - You
Are you a noobie or absolute beginner? No worries! We have video courses to get you going ASAP.
This is how you can control your server from the command line.
Start your server
Pause your server
You should do this before shutting down your computer.
Resume your server
Delete your server
SSH into your server
Access the Database
From your application
These are the settings that work when connecting with PHP. You could technically create as many databases as you want.
$connection = mysqli_connect('localhost', 'root', 'root', 'scotchbox');
From a Desktop Client
You'll need to download either Sequel Pro or Navicat or some other desktop database client. Switching to one of these from phpMyAdmin will be a life changing experience so just do it already. After this, create a "new connection" and select SSH Forwarding and enter these parameters:
|🤖 Feature||🙂 Free Version||😃 Pro Version|
Updating the Box
Although not necessary, if you want to check for updates, just type:
vagrant box outdated
It will tell you if you are running the latest version or not of the box. If it says you aren't, simply run:
vagrant box update
Setting a Hostname
If you're like me, you prefer to develop at a domain name versus an IP address. If you want to get rid of the some-what ugly IP address, just add a record like the following example to your laptop's host file.
Or if you want "www" to work as well, do:
192.168.33.10 whatever-i-want.local www.whatever-i-want.local
Technically you could also a Vagrant Plugin like Vagrant Hostmanager to automatically update your host file when you run Vagrant Up. However, the purpose of Scotch Box is to have as little dependencies as possible so that it's always working when you run "vagrant up".