Developing & deploying

with

git & composer 

Requirements

  • Team
  • Track code changes
  • Local development, test on staging
  • Deployment of code, media, database
  • Process without FTP or too complex
  • Easy and quick to set-up
  • No extra expenses
  • Windows & Mac support
  • Shared Hosting support

Code

Demo

  1. track code changes and revert if necessary
  2. supports multiple users
  3. push and pull code to and from GitHub, staging and production server
  4. code is safe and can be cloned anywhere
  5. git hooks to run commands on events
  • manage and update dependencies like WordPress, plugins and themes
  • composer installs only the version defined in the composer.lock
  • dependancy code is not duplicated in git

Premium plugins

Media

Database

Content changes always made on the live site

 

Challanges

  • DISALLOW_FILE_MODS removes update notification
  • Files generated by plugins like caching plugins
  • Private data in the config files
  • Shared hosting caching does not support subfolder WordPress installs
  • Backup of media files
  • SSL Certificate for staging and local sites
  • Different settings for staging sites like test mode for payment gateway or activate test gateway

Ulrich Pogson

@grapplerulrich

Developing & deploying sites with git & composer

By Ulrich Pogson

Developing & deploying sites with git & composer

  • 1,587