Slide 1

Slide 1 text

Composer & WordPress Deploy All The Things - Tom J Nowell

Slide 2

Slide 2 text

1. What is Composer 2. Installing WordPress 3. Installing a Theme 4. Installing a Plugin

Slide 3

Slide 3 text

What is Composer?

Slide 4

Slide 4 text

composer.json { "name" : "tomjn/myproject", "description": "A handy description.", "require" : { "php": ">=5.3" } }

Slide 5

Slide 5 text

Is it Valid? ~/www/test › composer validate ./composer.json is valid, but with a few warnings See http://getcomposer.org/doc/04-schema.md for details on the schema No license specified, it is recommended to do so. For closed-source software you may use "proprietary" as license.

Slide 6

Slide 6 text

composer.json { "name" : "tomjn/myproject", "description": "A handy description.", "license": "GPL-2.0+", "require" : { "johnpbloch/wordpress": "3.6.1", "php": ">=5.3" } }

Slide 7

Slide 7 text

~/www/test › composer install Loading composer repositories with package information Installing dependencies (including require-dev) - Installing johnpbloch/wordpress-core- installer (0.2.0) Downloading: 100% - Installing johnpbloch/wordpress (3.6.1) Downloading: 100% Writing lock file Generating autoload files

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

{ "name" : "tomjn/myproject", "description": "A handy description.", "license": "GPL-2.0+", "repositories": [ { "type": "package", "package": { "name": "wordpress/twentythirteen", "version": "1.0", "type": "wordpress-theme", "source": { "url": "http://themes.svn.wordpress.org/", "type": "svn", "reference": "twentythirteen/1.0/" }, "require": { "composer/installers": "~1.0" } } } ], "require" : { "johnpbloch/wordpress": "3.6.1", "wordpress/twentythirteen": "1.0", "php": ">=5.3" } }

Slide 10

Slide 10 text

~/www/test › composer update Loading composer repositories with package information Updating dependencies (including require-dev) - Installing wordpress/twentythirteen (1.0) Checking out twentythirteen/1.0/ Writing lock file Generating autoload files

Slide 11

Slide 11 text

{ "name" : "tomjn/myproject", "description" : "A handy description.", "license" : "GPL-2.0+", "repositories": [ { "type": "composer", "url": "http://wpackagist.org" }, { "type": "package", "package": { "name": "wordpress/twentythirteen", …………………………………………….. "require" : { "johnpbloch/wordpress": "3.6.1", "wordpress/twentythirteen": "1.0", "wpackagist/akismet": "*", "php": ">=5.3" } }

Slide 12

Slide 12 text

~/www/test › composer update Loading composer repositories with package information Updating dependencies (including require-dev) - Installing wpackagist/akismet (trunk) Downloading: 100% Writing lock file Generating autoload files

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

Final Steps

Slide 15

Slide 15 text

Questions?