Slide 1

Slide 1 text

81$-*ೖ໳ 8PSE$BNQ,ZPUP 5BLBZVLJ.JZBVDIJ !NJZB

Slide 2

Slide 2 text

• ౦ژͷλϩεΧΠגࣜձࣾ͞ΜͱҰॹʹ࢓ࣄͯ͠·͢ɻ • VCCW։ൃऀɻVVVɺWordmoveɺWP-CLIɺWP-APIͳͲ ͷϓϩδΣΫτʹߩݙ • ࿨Վࢁݝ۲ຊொࡏॅ • capitalp.jp ͍ͬͯ͏ڞಉϒϩά΍ͬͯ·͢ɻ

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

w81$-*ͷΠϯετʔϧํ๏ wઃఆ w׆༻ࣄྫ w֦ு wߩݙ ࠓ೔͓࿩͢Δ͜ͱ

Slide 7

Slide 7 text

81$-*ͱ͸

Slide 8

Slide 8 text

• WordPress ΛίϚϯυϥΠϯͰૢ࡞͢ΔͨΊͷπʔϧ • ؅ཧը໘ͰͰ͖Δ͜ͱʴα ΛίϚϯυϥΠϯͰ࣮ߦՄೳ • VVVɺVCCWɼAMIMOTOɺԤถͷϗεςΟϯάձࣾͳͲ Ͱར༻͞Ε͍ͯΔɻ http://wp-cli.org/

Slide 9

Slide 9 text

Daniel Bachhuber @danielbachhuber Alain Schlesser @schlessera ίϛολʔ

Slide 10

Slide 10 text

wp core download --path=$(pwd) --locale=ja wp config create \ --dbhost=localhost \ --dbname=wordpress \ --dbuser=root \ --dbprefix=wp_ \ --locale=ja wp core install \ --url=http://127.0.0.1:8080 \ --title="WordPress" \ --admin_user="admin" \ --admin_password="admin" \ --admin_email="[email protected]" wp server --host=0.0.0.0 --port=8080 --docroot=$(pwd) https://gist.github.com/miya0001/f3e3aed260efa8823116500b5e70db74

Slide 11

Slide 11 text

Πϯετʔϧํ๏

Slide 12

Slide 12 text

$ curl -O https://.../wp-cli.phar $ chmod 755 wp.phar $ mv wp.phar /usr/local/bin/wp $ wp --info https://wp-cli.org/#installing

Slide 13

Slide 13 text

ಈ࡞؀ڥ • Unixܥͷ؀ڥʢWindowsͰ͸Ұ෦੍ݶ͋Γʣ • PHP 5.3.29 or later • WordPress 3.7 or later

Slide 14

Slide 14 text

ઃఆϑΝΠϧ

Slide 15

Slide 15 text

~/.wp-cli/config.yml ./wp-cli.yml https://make.wordpress.org/cli/ handbook/config/ ઃఆͳ͠Ͱ΋ಈ࡞͠·͕͋͢Δͱศར

Slide 16

Slide 16 text

׆༻ࣄྫ

Slide 17

Slide 17 text

ΤΠϦΞεͰ
 ෳ਺ͷ8PSE1SFTTΛ
 Ξοϓσʔτ

Slide 18

Slide 18 text

@example.dev: path: /Users/miyauchi/valet/example @vccw.dev: ssh: [email protected]:22/var/www/html dXQDMJDPOpHʹҎԼͷΑ͏ʹهड़ $ wp @vccw.dev plugin list $ wp @all plugin list

Slide 19

Slide 19 text

#!/usr/bin/env bash wp @all core update wp @all plugin update --all wp @all theme update --all wp @all core language update

Slide 20

Slide 20 text

@live: - @vccw.dev @staging: - @example.dev $ wp @staging core update εςʔδϯάͱຊ൪ʹ෼͚࣮ͯߦ͢Δ͜ͱ΋Մೳ @staging ͷΈίΞΛΞοϓσʔτ

Slide 21

Slide 21 text

ΠϯϑϥߏஙΛࣗಈԽ

Slide 22

Slide 22 text

- name: Run `wp plugin install` command: | wp plugin install {{ item }} --activate --path={{ path }} with_items: "{{ vccw.plugins }}" ϓϥάΠϯΛΠϯετʔϧ͢ΔͨΊͷ
 Ansible playbook ͷྫ https://github.com/vccw-team/vccw/blob/ master/provision/playbooks/wordpress.yml

Slide 23

Slide 23 text

4FSWFSTQFDͰ ಈ࡞ςετΛࣗಈԽ

Slide 24

Slide 24 text

https://travis-ci.org/vccw-team/vccw/jobs/237365166

Slide 25

Slide 25 text

֦ு

Slide 26

Slide 26 text

• WP-CLIͰ͸αʔυύʔςΟͷίϚϯυΛ௥Ճ͢Δ͜ͱ͕ Ͱ͖·͢ɻ • WordPress ϓϥάΠϯͱͯ͠։ൃ • ύοέʔδίϚϯυͱͯ͠։ൃ https://make.wordpress.org/cli/handbook/ commands-cookbook/

Slide 27

Slide 27 text

͓͢͢Ίύοέʔδ http://wp-cli.org/package-index/

Slide 28

Slide 28 text

$ wp valet • Laravel ༻ͷ։ൃ؀ڥ Valet ্ʹ WordPress ؀ڥΛߏங • खͬऔΓૣ͘ WordPress Λ࡞ͬͨΓࣺͯͨΓ͢Δࡍʹศ རɻ https://github.com/aaemnnosttv/wp-cli-valet-command

Slide 29

Slide 29 text

$ wp scaffold vccw VCCW ༻ͷϑΝΠϧΛੜ੒͢ΔίϚϯυɻ https://github.com/vccw-team/scaffold-vccw

Slide 30

Slide 30 text

$ wp shifter σδλϧΩϡʔϒ͞ΜͷαʔϏε Shifter ʹ
 WordPress ΛσϓϩΠ͢ΔͨΊͷίϚϯυ https://github.com/getshifter/wp-cli-shifter

Slide 31

Slide 31 text

81$-*΁ͷߩݙ

Slide 32

Slide 32 text

$ git clone wp-cli/media-command.git $ cd media-command $ composer install $ vendor/bin/behat όάͬΆ͍΋ͷΛݟ͚ͭͨΒ @miya0001 ʹ࿩͔͚ͯ͠΋Βͬͯ΋େৎ෉Ͱ͢ɻ

Slide 33

Slide 33 text

͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ