Skip to content

A modern, easy to configure, WordPress ready Vagrant box, perfect for local development.

License

Notifications You must be signed in to change notification settings

jonathanbossenger/boss-box-lemp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Boss Box

A modern, easy to configure, WordPress ready Vagrant box, perfect for local development.

Credits

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.

What's included?

Base Web Server Stack (LEMP)

  1. Ubuntu 16.04 LTS
  2. Nginx
  3. MySQL 5.7
  4. PHP 7.0

Utilities

  1. Git
  2. Vim
  3. Imagemagick
  4. Curl

Additional Software

  1. PHPUnit
  2. PHPMyadmin
  3. Xdebug
  4. Composer
  5. WP-CLI
  6. Ngrok
  7. Node.js
  8. Memcached
  9. Go
  10. MailHog

Configuration options

  1. Ability to enable/disable update checks (when working offline)
  2. Edit sitename, IP address, database name, and MySQL root password
  3. Set Virtual Machine memory size

Required Software

Make sure you have the following software installed

  1. Vagrant
  2. VirtualBox

Recommended Software

Vagrant Hosts Updater

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 git@github.com:jonathanbossenger/boss-box-lemp.git

Switch to the boss-box-lamp directory

cd boss-box-lamp

Copy the 'vagrant' folder to your project web root

cp -r vagrant/ /path/to/myproject/webroot/vagrant/

Switch to the project vagrant directory

cd ~/path/to/myproject/webroot/vagrant/

Edit the settings.yaml file in the newly copied /path/to/myproject/webroot/vagrant/ directory as required.

Start BossBox

vagrant up

Basic Vagrant Usage

vagrant up

Start the virtual machine

vagrant halt

Stop the virtual machine

vagrant ssh

Login to the virtual machine via SSH

Access

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

PHPMyAdmin

http://192.168.33.10/phpmyadmin or http://sitename/phpmyadmin

MailHog

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

  1. Either setup the PHPStorm Bookmarklets or install the Xdebug helper for Chrome
  2. Start debugging from the browser using whichever option you've chosen above
  3. Make sure PHPStorm is listening for incoming debug connections (Run > Start listening for PHP debug connections)
  4. Set breakpoints in your PHPStorm code window
  5. 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.

PHP.ini settings

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.

/etc/php/7.0/fpm/conf.d/user.ini

Enjoy!

About

A modern, easy to configure, WordPress ready Vagrant box, perfect for local development.

Resources

License

Stars

Watchers

Forks

Packages