What goes in Git? • Entire Site • Single Plugins and Themes • Never commit your wp-config.php file • Google “Git Ignore WordPress” for an example .gitignore file
Deploy with sanity • Dev / Test / Production environments • Stop doing things manually • Use WP-DB-MIGRATE to move data • Use WP-Pusher to deploy updates (no FTP, yay!) • Use Git on your server • Capistrano or Chef
Use Core Features • Theme Customizer • Settings API • Options API • Image Thumbnails • Menu System • Widgets, Shortcodes • Custom Post Types & Taxonomies
WP-CLI • A WordPress command line interface • Setup, install, configure sites from your terminal • Easily create scripts to spin up new sites • Automate Database migrations • Schedule Database Migrations
Manage Dependencies • Use plugin_exists( ‘my-plugin’ ), class_exists( ‘MyClass’ ), or function_exists( ‘my_awesome_function’ ) • TGM Plugin Activation • Require / Recommend dependencies in your custom themes and plugins • Use composer • custom plugin or theme with third party dependencies
My Workflow 1. Grab a task (Jira or Trello) 2. Pull latest version of project from Bitbucket 3. Pull latest version of data from Staging / Production 4. Code feature / fix bug 5. Commit and push updated code with comment and link back to ticket in Jira/Trello 6. Deploy with WP Pusher or Git
My Tools • Editor: Atom.io • Local Dev: MAMP Pro • Terminal: iTerm • Source Control: Git with Bitbucket • Data Management: WP DB Migrate Pro • Deployment: WP Pusher • Site Management: InfiniteWP