You may want to read our overview.
- Run a search and replace for
site-name
to whatever the subdomain for your development site will be - Run a search and replace for
site_name
to whatever the database name for your development site will be - Run a search and replace for
Site Name
to whatever the human readable name for your development site will be - Remove these initial instructions, leaving the "Development environment bootstrap" heading and everything below it
- Create a deploy user on your GitHub repo, create a set of private and public keys for this user and upload the public key to GitHub. Copy the public and private keys for this user into the
ssh
folder of this bootstrap. Give this user pull permissions. NOTE: You have a potential security issue if you give this user push (or GitHub admin) permissions, as you are distributing the private key for the user! - Amend the "Development environment bootstrap" heading and paragraph below so it reflects your purpose for the particular development environment
- Test everything works as expected in a VVV context
- Copy or
git push
to a new repo or new branch in an existing repo - Point people towards the
readme.md
in the repo you pushed to, so they can get going
See Composer and Private Repos
The private and public keys are not included in this publically distributed repo, you will need to copy these into the .ssh
folder.
You will need to include the Composer autoload, so add this near the top of wp-config.php
(which is a file you may wish to have under version control, separating out the environment specific portion into a non-version controlled wp-config-local.php
):
// composer
if ( file_exists( __DIR__ . '/wp-content/vendor/autoload.php' ) ) {
require __DIR__ . '/wp-content/vendor/autoload.php';
}
You've then got the wrapper-composer.sh
and build-wpengine.sh
scripts available to you.
This site bootstrap is designed to be used with Varying Vagrants Vagrant and a WordPress single site, the code for which is stored as a monolithic (or submoduled, probably) Git(Hub) repo.
To get started:
- If you don't already have it, clone the Vagrant repo (perhaps into your
~/Vagrants/
directory, you may need to create it if it doesn't already exist) - Install the Vagrant hosts updater:
vagrant plugin install vagrant-hostsupdater
- Clone this branch of this repo into the
www
directory of your Vagrant aswww/site-name
- If your Vagrant is running, from the Vagrant directory run
vagrant halt
- Followed by
vagrant up --provision
. Perhaps a cup of tea now? The initial provisioning may take a while. - If you want the user uploaded files, you'll need to download these separately
Then you can visit:
This script is free software, and is released under the terms of the GPL version 2 or (at your option) any later version. See license.txt.