Vagrant-WP is a Vagrant configuration for creating and provisioning a LAMP stack development environment with Wordpress.
Your machine needs to have VirtualBox and Vagrant installed. If you want Vagrant to automatically update your hosts file, install the hostsupdater Vagrant plugin. For automatic database backups, install the Triggers Vagrant plugin.
Vagrant-WP will automatically install the latest version of Wordpress and configure wp-config.php. It will create a wordpress
user with password wordpress
and database wordpress
. The mysql root account password is set to rootpass
.
If you would rather manually install wordpress, change the INSTALL_WORDPRESS
variable in settings.sh
to false
and install wordpress in the www
directory.
Vagrant-WP will import database.sql
from the parent directory into the database if the file exists. You can change the wordpress database credentials by editing the variables in settings.sh
.
If the Vagrant Triggers plugin has been installed, Vagrant will automatically backup the database into database.sql
when you issue the vagrant destroy
command.
Vagrant-WP will automatically sync a wp-content
folder from the parent directory into the WordPress base folder. This will allow you to add plugins, themes, or uploads content automatically to the development environment.
If a wp-content
folder doesn't exist, Vagrant-WP will clone the standard wp-content folder from Wordpress.
If INSTALL_WORDPRESS
is set to false
, Vagrant-wp will symlink the www folder to the webroot instead of syncing the wp-content
folder.
To build the development environment, clone the repo and run:
vagrant up
After Vagrant has created the development environment, Wordpress will be available at 192.168.33.10 or wordpress.dev if the vagrant-hostsupdater plugin has been installed.
Vagrant-WP creates a Ubuntu 14.04 LTS (Trusty Tahr) development server with the following installed:
- Apache 2.4
- MySQL 5.5
- PHP 5.5.9
- PhpMyAdmin
- Composer
- Git
- Curl
- Wordpress
- Wordpress CLI