- Create a full back-up of the production site from WpEngine.
- Create a new GitHub repository using the wpengine-site as a template.
- Clone the repository locally and extract the backup archive inside of it.
- Add your SSH key to the staging & production push accesses.
- Add the staging & production WpEngine remotes locally.
- Do a push to the staging environment and ensure this works correctly. Sometimes copying the production environment to staging is required to get this through.
- Branch GitHub app permissions should be granted on the organisation owning the repository.
- Login or sign-up with GitHub to Branch CI.
- Add a new project by selecting the GitHub repository
- Go to the Settings tab and copy the project's SSH public key. Paste it for both staging & production Git push access next to your own.
- (Optional) Add a build step by selecting compile frontend assets with NPM and fill in the necessary commands to be run.
- Add the Wp Engine Git Deployment part once for production and swap out $WPENGINE_GIT_URL by your own production remote like [email protected]:production/xxx.git and select from the Advanced options only for branch
master
git remote add wpengine $WPENGINE_GIT_URL
git push wpengine master
- Add the Wp Engine Git Deployment part for staging too and swap out $WPENGINE_GIT_URL by your own staging remote like [email protected]:production/stagexxx.git
and select from the Advanced options only for branch
staging
. - (Optional) If the develop environment is also used, take the same steps as for staging, but limit the build just to the
develop
branch.
We recommend either vvv or Local by Flywheel for setting it up. Local by Flywheel joined WpEngine, hence it's likely that more features will be built to improve the experience when working on sites hosted with them.