Bonzai
Bonzai is a kick-starting Wordpress development stack for mastering your automated deployments and others repetitive tasks.
Much of the philosphy behind Bonzai is inspired by the Bedrock Stack, but as we are running Windows environments, we are more familiar with some Grunt tasks written in Javascript, instead of Ruby. So we made our own.
Features
- Vagrant environment ready using Homestead
- Dependency management with Composer
- Automated construction with Grunt
- Automated deployments with Shipit
- WP pre-configuration with WP-Cli
- Database migration with WPMDB
- Environment variables with Dotenv
- Better folder structure and Integrated plugins
- And more ...
Summary
It is recommended to read the docs in the following order :
- Introduction
- How it works
- Additional
Folder Structure
The organization of Bonzai is similar to putting WordPress in its own subdirectory but with some improvements.
- In order not to expose sensitive files in the webroot, Bonzai moves what's required into a
public/
directory including the vendor'swp/
source, and thewp-content
source. You can customize this folder name during the first installation, but make sure to not name it like a folder that already exist in the folder structure. wp-content
(or maybe justcontent
) has been namedapp
to better reflect its contents. It contains application code and not just "static content". It also matches up with other frameworks such as Symfony and Rails.wp-config.php
remains in thepublic/
because it's required by WP, but it only acts as a loader. The actual configuration files have been moved toconfig/
for better separation.vendor/
is where the Composer managed dependencies are installed to.wp/
is where the WordPress core lives. It's also managed by Composer but can't be put undervendor
due to WP limitations.
Click on the links below for more information about the directory/file.
- config/
- bonzai/
- grunt/
Folder that allow to edit grunt actions/tasks or add new ones
- actions/
- tasks/
- shell/
- post-deploy.sh
Script executed remotely after deploying
- post-deploy.sh
- wp-constants/
Environment variables
- _options.php
- development.php
- production.php
- staging.php
- application.json
- grunt/
- homestead/
- bonzai/
- bonzai/
- logs/
: storing PHP error logs for easy access. Will also be displayed on WP admin dashboard
- mysql_backup/
: Folder used to store local database dumps
- node_modules/
- public/
- wp/
- app/
- cache/
- languages/
- mu-plugins/
- plugins/
- themes/
- uploads/
- .htaccess
- index.php
- wp-config.php
- tmp/
- workspace/
- vendor/
- .env
- .gitattributes
- .gitignore
- .travis.yml
- CHANGELOG.md
- composer.json
- Gruntfile.js
- package.json
- README.md
- ruleset.xml
- Vagrantfile
- wp-cli.yml