- Vagrant
- VirtualBox
- Vagrant plugins
vagrant plugin install vagrant-hostmanager vagrant-triggers
-
npm install -g newbox
-
See newbox
-
Clone this repo into your desired site directory.
git clone https://github.com/Jinksi/thrive-box.git my-site
-
In Vagrantfile, change the hostname –
config.vm.hostname = "thrive-box.dev"
to"my-site.dev"
-
Open your site directory in terminal and run
vagrant up
. It will take ~10mins the first time you create a site, ~30sec thereafter.
-
Copy the site into
public
-
Copy the site's database (
mysite_db.sql
) topublic
-
Update
wp-config.php
to use the database user & password:root
-
SSH into the Virtual Host with
vagrant ssh
from the site directory -
Change to the
public
directory
cd /var/www/public
- Create a new database
wp db create
- Import your existing database
wp db import mysite_db.sql
- Search and replace
wp search-replace live-site.thrv.xyz my-site.dev
- Update site settings in
config.yml
Choose sitename, plugins, theme, username, password etc.
-
SSH into the Virtual Host with
vagrant ssh
from the site directory -
Change to the
www
directory
cd /var/www
- Run the setup script
bash setup.sh
- Done