This is a set of bash scripts that will allow a user to set up a virtual machine using Vagrant with a LAMP stack and WordPress install. It includes the following tools:
- apache 2.6
- mysql 5.7.x
- PHP 7.x
- WP-CLI
- git
- (optional) exim mail client for testing
It presumes the following:
- Running on macOS or Linux
- Using VirtualBox as the VM Host
By default, the credentials for the Database and WordPress are:
User: admin Pass: vagrant
The default user on login is vagrant
.
The /var/www/
directory is mounted to the host OS in the project's www
folder.
Read more about Synced Folders: https://www.vagrantup.com/docs/synced-folders/
Users may forego the LAMP and WordPress installs if they just want a basic Ubuntu VM, or just install LAMP if they do not want WordPress.
THESE SCRIPTS ARE NOT MEANT FOR USE IN A PRODUCTION ENVIRONMENT. THEY ARE ONLY INTENDED FOR DEVELOPMENT ENVIRONMENTS.
Please open an issue on the GitHub repository if there are any problems!
# vagrant development machines
192.168.10.10 one.localhost.dev
192.168.10.20 two.localhost.dev
etc.
$ cd ~/folder/where/your/projects/live
$ git clone https://github.com/uhm-coe/vagrant-ubuntu-lamp-wp.git yourprojectname
$ cd yourprojectname
$ ./scripts/vagrant_setup.sh
If desired, run the LAMP install and WordPress install in order
$ vagrant ssh
$ /vagrant/scripts/lamp_setup.sh
$ vagrant ssh
$ /vagrant/scripts/wordpress_setup.sh
$ cd ~/folder/where/your/projects/live
$ cd yourprojectname
$ vagrant suspend
Coming back to your project mostly involves making sure that your vagrant machine is up and running:
$ cd ~/folder/where/your/projects/live
$ cd yourprojectname
$ vagrant up