A modern, easy to configure, WordPress ready Vagrant box, perfect for local development.
This project was inspired by Scotch Box and built using the Scotch Box Pro build scripts by Nicholas Cerminara. If you like this project, please also consider supporting Nick by purchasing a Scotch Box Pro license at a mere $15.
Base Web Server Stack (LEMP)
- Ubuntu 16.04 LTS
- MySQL 5.7
- PHP 7.0
- Ability to enable/disable update checks (when working offline)
- Edit sitename, IP address, database name, and MySQL root password
- Set Virtual Machine memory size
Make sure you have the following software installed
This plugin will allow your system to manage writing to the hosts file automatically, instead of having to edit /etc/hosts each time.
A note on Vagrant box size
The Boss Box image is approximately 900mb in size. This means that the first time you use it, you'll have to download it to your hard drive, meaning your first vagrant up could take a little while.
Initial Setup (Linux/OSx)
From a terminal window:
Clone the github repo
git clone firstname.lastname@example.org:jonathanbossenger/boss-box-lemp.git
Switch to the boss-box-lamp directory
Copy the 'vagrant' folder to your project web root
cp -r vagrant/ /path/to/myproject/webroot/vagrant/
Switch to the project vagrant directory
Edit the settings.yaml file in the newly copied /path/to/myproject/webroot/vagrant/ directory as required.
Basic Vagrant Usage
Start the virtual machine
Stop the virtual machine
Login to the virtual machine via SSH
You can access the local site by either the IP address or sitename specified in your settings.yaml (if you have set the relevant /etc/hosts record)
http://192.168.33.10 or http://sitename
http://192.168.33.10/phpmyadmin or http://sitename/phpmyadmin
http://192.168.33.10:8025 or http://sitename:8025
Using Xdebug with PHPStorm
This box has Xdebug installed and is setup to make use of the Zero-configuration Debugging with PhpStorm
- Either setup the PHPStorm Bookmarklets or install the Xdebug helper for Chrome
- Start debugging from the browser using whichever option you've chosen above
- Make sure PHPStorm is listening for incoming debug connections (Run > Start listening for PHP debug connections)
- Set breakpoints in your PHPStorm code window
- Refresh your project url
On the first run, PHPStorm will ask you to map the debugger to a local path, you should be able to accept the defaults.
Boss box has it's own custom PHP.ini file for overriding the default PHP.ini. You can find this file in the following location.