Before you start developing ask a lead developer to export you the latest version of the database.
feature
branch- Development is done localy on your computer
- Create
feature/feature-name
branch frommaster
and create pull request tostaging
branch
http://dev.boilerplate.com/
staging
branch- QA testing and client tests and approvals
- Never merge
staging
tomaster
branch.
https://staging.boilerplate.com
master
branch- Create pull request from
feature
branch tomaster
when it is production ready - NO OVERRIDING THE DATABASE
https://boilerplate.com
For syncing the production server with staging and development you have 3 shell scripts. The use WP-CLI so be sure that your server has this module installed.
Once you run this script it will export your database and uploads folder. Everything is compressed and exported in latest_dump.tar.gz
file in the root of your project.
_db-export.sh
Once you run this script it will delete the current database and import the new one from latest_dump.tar.gz
file that must be located in the root of the project.
Uploads folder must be manually moved to the wp-content
folder.
_db-import-production-to-dev.sh
_db-import-production-to-staging.sh
At the bottom of the wp-config.php
file before require_once ABSPATH . 'wp-settings.php';
add this part:
// Include wp config for your project.
require_once( ABSPATH . 'wp-config-project.php' );
This is project specific configuration that you can tailor according to your project needs.