🥃
Common Questions

Why no __________?


Scotch Box tries to accomplish some tricky goals:

  • Be as feature-packed as possible
  • Remain slim so that it always "just works"
  • Be super easy to use and setup for beginners

Some features are left out because of this. If you'd like to know how to add them or think it would be a great addition, just leave us note on Github!

Why no phpMyAdmin?


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.

Why no XDebug?


The box is targeted towards beginners and meant to be as plain as possible from scratch. If you'd like to add XDebug, you can easily!

Check out this additional resource at getting it setup further.




Additional Help

How to Install Laravel?

Don't overthink this! Just download Laravel from GitHub and copy and paste the contents here.


Here's a command line example that would also work.

                        
cd my/favorite/folder/for/storing/projects
git clone https://github.com/scotch-io/scotch-box my-new-laravel-project
cd my-new-laravel-project
vagrant up
vagrant ssh
cd /var/www
laravel new project # Patience, let it download and do its thing...
rm -rf README.md .gitignore public/ # Removing conflicting files
mv project/* project/.[^.]* . # Put Laravel files in right spot
rm -rf project # All done
                        
                        



Additional Help

How to Install WordPress?

Don't overthink this! Just download WordPress from GitHub and move it to the public folder! After that, just connect wp-config.php to the database.


Here's a command line example that would also work.

                        
cd my/favorite/folder/for/storing/projects
git clone https://github.com/scotch-io/scotch-box my-new-wordpress-project
cd my-new-wordpress-project
vagrant up
vagrant ssh
cd /var/www/public
rm index.php
git clone https://github.com/WordPress/WordPress --depth=1 .
                        
                        

Custom Provisioning?

You can force your vagrant up to also run bash commands. There's 2 ways:


Example 1: A .sh file

                        
# Configure the shell file as a provision step:
config.vm.provision "shell", path: "install.sh", privileged: false
                        
                        

Example 2: Inline

                        
config.vm.provision "shell", inline: <<-SHELL

    echo 'Update the box'
    sudo apt-get update
    sudo apt-get -y upgrade

SHELL
                        
                        

Vagrant is Slow!

You can try to enable NFS to improve performance greatly. This is already in the Vagrantfile and just needs to be commented out.


Turn NFS On

                        
config.vm.synced_folder ".", "/var/www", :mount_options => ["dmode=777", "fmode=666"]

# Optional NFS. Make sure to remove other synced_folder line too
# config.vm.synced_folder ".", "/var/www", :nfs => { :mount_options => ["dmode=777","fmode=666"] }
                        
                        


Turn NFS On (experimental but faster)

                        
config.vm.synced_folder ".", "/var/www", :nfs => { :mount_options => ["dmode=777","fmode=666", 'vers=3', 'tcp', 'fsc' ,'actimeo=2'] }
                        
                        


Allow More Resources

                        
config.vm.provider "virtualbox" do |v|
    v.memory = 4096
    v.cpus = 4
end
                        
                        



Additional Help

SSH not working?

Vagrant might automatically try and detect a setting for your system that it deems better or available. If this is the case, a port or something might change from the default login settings.


If this happens, just do vagrant ssh-config to see your SSH settings.

Weird authentication issues? Can't connect to box

This might happen but don't worry. If you can't connect to the box, just add this to your Vagrantfile:

                        
config.ssh.username = "vagrant"
config.ssh.password = "vagrant"
                        
                        

Maria DB?

You might prefer MariaDB instead of MySQL. That's fine, here's a nice resource on swapping it:

So, something like this for your:


# Install MariaDB
sudo apt-get -y install software-properties-common
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db
sudo add-apt-repository -y 'deb [arch=amd64,i386,ppc64el] http://mirror.ufscar.br/mariadb/repo/10.1/ubuntu trusty main'
sudo apt-get -y update
export DEBIAN_FRONTEND=noninteractive
sudo debconf-set-selections <<< 'mariadb-server-10.1 mysql-server/root_password password root'
sudo debconf-set-selections <<< 'mariadb-server-10.1 mysql-server/root_password_again password root'
sudo apt-get install -y mariadb-server
sudo service mysql restart


# Permitir ROOT em todos os hosts
sudo sed -i "s/bind-address\s*=\s*127.0.0.1/bind-address = 0.0.0.0/" /etc/mysql/my.cnf
sudo echo "GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION" | mysql -u root --password=root
sudo echo "GRANT PROXY ON ''@'' TO 'root'@'%' WITH GRANT OPTION" | mysql -u root --password=root
sudo service mysql restart

Multiple Domains

The beauty of Vagrant is to have one vagrantfile per project. This should even be with the Git repo so that any person can immediately get up and running with the project. It's like the "project setup" instructions.


Some people prefer not to do this though or out of cpu storage. You can work around this by just setting up multiple vhost either manually or at vagrant up.

Misc. Still Need Help?

Then visit: