Slide 1

Slide 1 text

Get your Git on Matt Radford

Slide 2

Slide 2 text

This is not a talk about git https://www.atlassian.com/git/tutorials/

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

My awesome dev strategy

Slide 5

Slide 5 text

My awesome dev strategy

Slide 6

Slide 6 text

My awesome dev strategy FIN

Slide 7

Slide 7 text

My new awesome dev strategy

Slide 8

Slide 8 text

I absolutely never ever do this now (honest) My new awesome dev strategy

Slide 9

Slide 9 text

My new new awesome dev strategy Local install Server

Slide 10

Slide 10 text

My new new awesome dev strategy I absolutely never ever do this now (honest)

Slide 11

Slide 11 text

My new new awesome dev strategy PLUS!

Slide 12

Slide 12 text

My new new awesome dev strategy I absolutely never ever do this now (really)

Slide 13

Slide 13 text

• SFTP • Transmit’s Sync feature • “Staging” • Not calling something “staging” when it was really another folder on the live server… • Dropbox - local backup and versioning • Sequel Pro • WP Migrate DB My new new awesome dev strategy (gradual ensmartening)

Slide 14

Slide 14 text

• I always took backups before deploying • I never had things fail to FTP properly, leaving sites in an unknown state • Databases never failed to import or corrupted • Basically, nothing every went wrong My new new awesome dev strategy (totally minor glitches)

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

Our dev strategy • Needed to both develop at the same time • Keep the entirety of the WP install in sync • Easy setup • Push to staging and live

Slide 17

Slide 17 text

Our dev strategy (install) • Shared DB on a local server • Bash script • Composer • http://codelight.eu/using-private-wordpress- repositories-with-composer/ • Git

Slide 18

Slide 18 text

• It’s all there! • Clone the repo, create a new remote, set up the DB and MAMP • Everything’s in sync • Pushing to staging means it’s a complete copy One install, one repo Pros Cons • It’s all there! • Size limits

Slide 19

Slide 19 text

• Clone base theme repo to create a project- specific theme repo. • Nice and contained One theme, one repo Pros Cons • Set up not so easy • Everything outside of theme?

Slide 20

Slide 20 text

• WP core in a submodule • Everything else is in /content One repo, WP submodule Pros Cons • Uploads…

Slide 21

Slide 21 text

Our dev strategy (deploy) • WP DB Migrate Pro • Scripts • Deployment tools • Deployment services

Slide 22

Slide 22 text

Our dev strategy Staging Live Local

Slide 23

Slide 23 text

Not like this

Slide 24

Slide 24 text

Our dev strategy Staging Live Local ?

Slide 25

Slide 25 text

• Github Updater • WP Pusher WP git plugins • Revisr • VersionPress • Gitium

Slide 26

Slide 26 text

Revisr is a Git and WordPress database plugin that allows you to keep track… in version control. “…eliminates redundant interfaces in your workflow…” https://revisr.io

Slide 27

Slide 27 text

• Aimed at developers • Auto push and pull commits using webhooks with BB, Github and other copies of Revisr - keep local and staging up- to-date • Supports branches and tags [docroot]          │          ├───.git          │          ├───index.php          │          ├───local-­‐config.php          │          ├───wp-­‐config.php          │          ├───wp          │      ├───wp-­‐admin          │      └───wp-­‐includes          │          ├───wp-­‐content              ├───plugins              ├───themes              └───uploads

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

No content

Slide 32

Slide 32 text

VersionPress is a Git-versioning plugin for WordPress. It versions both files and the database enabling things like site-wide reverts, safe updates, easy staging

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

No content

Slide 35

Slide 35 text

No content

Slide 36

Slide 36 text

Automatic git version control and deployment for your plugins and themes integrated into wp-admin. https://wordpress.org/plugins/gitium/

Slide 37

Slide 37 text

No content

Slide 38

Slide 38 text

• One repo: one theme or plugin • Open Source • You’re in safe hands https://github.com/afragen/github-updater github-updater

Slide 39

Slide 39 text

Template  Version:  1.0.0   GitHub  Theme  URI:  https://github.com/afragen/test-­‐child   GitHub  Branch:        master github-updater

Slide 40

Slide 40 text

Are you brave enough? • add_filter( 'auto_update_plugin', '__return_true' ); • add_filter( 'auto_update_theme', '__return_true' ); • http://codex.wordpress.org/ Configuring_Automatic_Background_Updates

Slide 41

Slide 41 text

• WordPress GitHub Plugin Updater • https://github.com/radishconcepts/WordPress- GitHub-Plugin-Updater • Automatic Theme & Plugin Updater • https://github.com/jeremyclark13/automatic- theme-plugin-update • http://code.tutsplus.com/tutorials/distributing-your- plugins-in-github-with-automatic-updates-- wp-34817 Similar plugins

Slide 42

Slide 42 text

“Pain-free deployment of WordPress themes and plugins directly from GitHub” (and Bitbucket) “If it can run WordPress, it can run WP Pusher” hooks into WordPress and uses core functionality to fetch your themes and plugins from GitHub https://wppusher.com

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

No content

Slide 45

Slide 45 text

• Direction from Automatic & VIP • Core in git • DB • Managed WP host with git • easy move between staging & live the future?

Slide 46

Slide 46 text

Thank you Matt Radford