Upgrade to Pro — share decks privately, control downloads, hide ads and more …

WordPress 管理をラクにする
WP-CLI

YAT
July 20, 2019

WordPress 管理をラクにする
WP-CLI

Shimane WordPress Meetup #6 でお話したスライドです。
WP-CLI の紹介、使い方など。

YAT

July 20, 2019
Tweet

More Decks by YAT

Other Decks in Technology

Transcript

  1. 8PSE1SFTT؅ཧΛϥΫʹ͢Δ

    81$-*
    4IJNBOF8PSE1SFTT.FFUVQ
    :"5

    View full-size slide

  2. :"5
    σβΠϯίϛϡχςΟ

    ʮσβΠϯϑϩϯτʯओ࠵
    ϑϦʔϥϯε
    σβΠφʔσϕϩούʔ
    :"5ͷCMPHΛӡӦ
    IUUQTQSPpMFTXPSEQSFTTPSHZBUKQ
    8PSE1SFTTQSPpMF

    View full-size slide

  3. 8PSE1SFTTͱͷؔΘΓ
    5IFNF%FWFMPQFS
    1MVHJO%FWFMPQFS
    5SBOTMBUJPO$POUSJCVUPS
    5SBOTMBUJPO&EJUPS
    8PSE$BNQ0SHBOJ[FS
    8PSE$BNQ4QFBLFS

    View full-size slide

  4. 3%%BTICPBSEQEG
    IUUQTXPSEQSFTTPSHQMVHJOTSEEBTICPBSEQEG

    View full-size slide

  5. UIFNSJTIWFSTJPO
    IUUQTHJUIVCDPNZBUKQUIFNSJTIW

    View full-size slide

  6. 8PSE1SFTTͷςʔϚ։ൃΛॳΊͯߦ͏ਓʹ޲͚ͯͷ੍࡞ϑϩʔ
    IUUQTXQZBUOFUDPN Q

    View full-size slide

  7. ࢓ࣄ಺༰
    w αΠτͷઃܭɾσβΠϯ
    w 69σβΠϯ
    w ϑϩϯτΤϯυɺόοΫΤ
    ϯυ
    w 8PSE1SFTT
    w ϥΠςΟϯά
    w ࣸਅࡱӨ
    w 6*σβΠϯ
    w ϚʔΫΞοϓɾίʔσΟϯά
    w αʔόʔαΠυ
    w ίϯαϧςΟϯά
    w ηϛφʔɺΠϕϯτओ࠵
    w ಈըࡱӨฤू

    View full-size slide

  8. %PZPVLOPX81$-*

    View full-size slide

  9. 81$-*
    l81$-*͸8PSE1SFTTΛ؅ཧ͢ΔͨΊͷίϚϯυϥΠϯΠϯλʔ
    ϑΣʔεͰ͢ɻϓϥάΠϯͷΞοϓσʔτ΍ϚϧναΠτͷηοτ
    ΞοϓͳͲͷଟ͘ͷ͜ͱΛϒϥ΢βແ͠Ͱߦ͏͜ͱ͕Ͱ͖·͢ɻz
    IUUQTXQDMJPSHKB

    View full-size slide

  10. 8PSE1SFTTͷΞοϓσʔτͲ͏ͯ͠Δʁ

    View full-size slide

  11. 8PSE1SFTTͷΞοϓσʔτͲ͏ͯ͠Δʁ

    View full-size slide

  12. 8PSE1SFTTͷΞοϓσʔτͲ͏ͯ͠Δʁ

    View full-size slide

  13. ӡ༻αΠτ͕ݸ͋ͬͨΒʁ

    View full-size slide

  14. ςετ؀ڥ΍ϩʔΧϧ؀ڥ΋
    ΍Δͱ͢Ε͹ʁ

    View full-size slide

  15. ϩάΠϯ͍ͯ͘͠ͷׂͱ໘౗

    View full-size slide

  16. 81$-*ͳΒ
    XQ˓˓VQEBUF
    ͜ͷίϚϯυΛୟ͚ͩ͘

    View full-size slide

  17. 81$-*ͳΒ
    ෳ਺͋ΔͳΒίϚϯυΛίϐϖ

    View full-size slide

  18. લఏ৚݅
    w ࠇ͍ը໘Λ৮Δඞཁ͕͋Δ
    w 44)ʹΑΔαʔόʔ઀ଓ͕ඞཁ
    w Ϋϥ΢υαʔόʔ 714 Ұ෦ϨϯλϧαʔόʔͰར༻Մೳ
    w 81$-*ͷΠϯετʔϧඞਢ

    View full-size slide

  19. w Ұ౓ίϚϯυΛ͍Ζ͍Ζௐ΂ͯ࢖͍ͦ͏ͳ΋ͷΛࣗ෼ϊʔτʹ͢Δ
    w Α͘࢖͏ίϚϯυ͸ׂͱগͳ͍ͷͰ͔ͦ͜Β࢖͏
    w શ෦࢖͓͏ͱ͠ͳ͍
    w Ұ౓ೖྗ࣮ͯ͠ߦͨ͠ίϚϯυ͸ˢΩʔͰཤྺ͕ग़ͤΔ
    w ίϚϯυΛϛεͯ͠΋࣮ߦ͞Εͳ͍͚ͩͰյΕͨΓ͠ͳ͍
    w ͨͩ͠࢖͍͚͍ͬͯͳ͍ίϚϯυ͸ຊ౰ʹյΕΔͷͰ࢖Θͳ͍
    ࠇ͍ը໘Λ࢖͏ίπ

    View full-size slide

  20. 44)
    44)ͱ͸ɺ4FDVSF4IFMMʢηΩϡΞγΣϧʣͷུশͰɺϦ
    Ϟʔτίϯϐϡʔλͱ௨৴͢ΔͨΊͷϓϩτίϧͰ͢ɻ
    ೝূ෦෼ΛؚΊωοτϫʔΫ্ͷ௨৴͕͢΂ͯ҉߸Խ͞Ε
    ΔͨΊɺ҆શʹ௨৴͢Δ͜ͱ͕Ͱ͖·͢ɻ

    View full-size slide

  21. 44)
    w.BD5FSNJOBM
    w8JOEPXT(JUCBTI
    wJ1IPOF5FSNJOVT
    w"OESPJE$POOFDU#PU
    etc

    View full-size slide

  22. αʔόʔ
    w"84
    w͘͞Β714
    w͘͞ΒϨϯλϧαʔόʔ
    wΤοΫεαʔόʔ
    etc

    View full-size slide

  23. 81$-*ͷΠϯετʔϧ
    Ϩϯλϧαʔόʹʰ81$-*ʱΛαΫͬͱೖΕΔγΣϧεΫϦ
    ϓτ࡞ͬͯΈͨΑ
    ͖ͯͬΜͷ۩ɻIUUQTXXXUFDLJOHPSHBSDIJWFT

    View full-size slide

  24. 81$-*ͷΠϯετʔϧ
    Ϩϯλϧαʔόʹʰ81$-*ʱΛαΫͬͱೖΕΔγΣϧεΫϦ
    ϓτ࡞ͬͯΈͨΑ
    ͖ͯͬΜͷ۩ɻIUUQTXXXUFDLJOHPSHBSDIJWFT

    View full-size slide

  25. ࿅श͢ΔͳΒϩʔΧϧͰ

    View full-size slide

  26. IUUQTMPDBMCZqZXIFFMDPN
    -PDBM

    CZ'MZXIFFM

    View full-size slide

  27. -PDBM

    CZ'MZXIFFM

    View full-size slide

  28. BQQQVCMJDҎԼʹ8PSE1SFTT͕ೖ͍ͬͯΔ
    -PDBM

    CZ'MZXIFFM

    View full-size slide

  29. -PDBM

    CZ'MZXIFFM
    XQDMJWFSTJPOόʔδϣϯ৘ใ֬ೝ

    View full-size slide

  30. 81$-*ࣗ਎ͷίϚϯυ

    View full-size slide

  31. 81$-*ࣗ਎ʹؔ͢ΔίϚϯυ
    w XQDMJWFSTJPO
    w XQDMJJOGP
    w XQDMJDIFDLVQEBUF
    w XQDMJVQEBUF
    όʔδϣϯදࣔ RͰൈ͚Δ

    ΠϯϑΥϝʔγϣϯ৘ใͷදࣔ
    Ξοϓσʔτ͕͋Δ͔νΣοΫ
    XQDMJͷΞοϓσʔτɻOJHIUMZ෇͚Δ
    ͱφΠτϦʔϏϧυ൛ ϦϦʔεલ։ൃத
    ͷ࠷৽൛
    ɻ

    View full-size slide

  32. Πϯετʔϧؔ܎

    View full-size slide

  33. Πϯετʔϧؔ܎
    w XQDPSFEPXOMPBE 8PSE1SFTTຊମμ΢ϯϩʔυ
    Φϓγϣϯ
    w WFSTJPO
    w MPDBMF
    όʔδϣϯࢦఆͯ͠μ΢ϯϩʔυ
    ݴޠࢦఆ
    8PSE1SFTTຊମΠϯετʔϧ
    w XQDPSFJOTUBMM

    View full-size slide

  34. Πϯετʔϧؔ܎
    w XQQMVHJOJOTUBMM ϓϥάΠϯΠϯετʔϧ
    Φϓγϣϯ
    w BDUJWBUF
    ͸ϓϥάΠϯ໊΍63-͕ೖΓ·͢ɻ [JQϑΝΠϧ͔Β΋Մೳ

    Πϯετʔϧͨ͠ϓϥάΠϯΛ༗ޮԽ

    View full-size slide

  35. Πϯετʔϧؔ܎
    w XQUIFNFJOTUBMM ςʔϚΠϯετʔϧ
    Φϓγϣϯ
    w BDUJWBUF
    ͸ςʔϚ໊΍63-͕ೖΓ·͢ɻ [JQϑΝΠϧ͔Β΋Մೳ

    Πϯετʔϧͨ͠ςʔϚΛ༗ޮԽ

    View full-size slide

  36. Ξοϓσʔτؔ܎

    View full-size slide

  37. Ξοϓσʔτؔ܎
    w XQDPSFVQEBUF 8PSE1SFTTຊମΞοϓσʔτ
    Φϓγϣϯ
    w WFSTJPO Ξοϓσʔτ͢ΔόʔδϣϯΛࢦఆ

    View full-size slide

  38. Ξοϓσʔτؔ܎
    w XQQMVHJOVQEBUF ϓϥάΠϯΛΞοϓσʔτ
    Φϓγϣϯ
    w BMM ͢΂ͯͷϓϥάΠϯΛΞοϓσʔτ

    View full-size slide

  39. Ξοϓσʔτؔ܎
    w XQUIFNFVQEBUF ςʔϚΛΞοϓσʔτ
    Φϓγϣϯ
    w BMM ͢΂ͯͷςʔϚΛΞοϓσʔτ

    View full-size slide

  40. σʔλϕʔε

    View full-size slide

  41. σʔλϕʔε
    w XQEC
    w XQECESPQZFT
    w XQECFYQPSU
    w XQECJNQPSU
    EC໊Λ࡞੒
    EC໊Λ࡟আ
    ϑΝΠϧ໊ͱͯ͠ECΤΫεϙʔτ
    ϑΝΠϧ໊͔ΒECΠϯϙʔτ

    View full-size slide

  42. σʔλϕʔε಺จࣈྻॻ͖׵͑

    View full-size slide

  43. σʔλϕʔε಺จࣈྻॻ͖׵͑
    w XQTFBSDISFQMBDFMPDBMDPNFYBNQMFDPN
    EC಺ͷจࣈྻMPDBMDPNΛFYBNQMFDPNʹஔ͖׵͑
    ͜ͷࡍγϦΞϥΠζ΋ஔ͖׵͑ͯ͘ΕΔ

    View full-size slide

  44. γϦΞϥΠζ

    View full-size slide

  45. γϦΞϥΠζ
    σʔλΛ΋ͭͷʹʮܕʯʮαΠζʯʮ஋ʯΛηοτͰ࣋ͭ΋ͷɻ

    View full-size slide

  46. γϦΞϥΠζ
    ܕɾɾɾɾ4USJOHܕɹɹɹɹɹɹܕ
    αΠζɾɾɹɹɹɹɹɹɹɹจࣈ਺
    ஋ɾɾɾɾIUUQMPDBMIPTU
    ͜ͷ৘ใΛηοτͰ͍࣋ͬͯΔ

    View full-size slide

  47. γϦΞϥΠζ
    ͜ͷ৘ใΛςΩετͰม׵ͯ͠͠·͏ͱ
    ܕɾɾɾɾ4USJOHܕ
    αΠζɾɾ
    ஋ɾɾɾɾIUUQMPDBMIPTU
    ܕɾɾɾɾ4USJOHܕ
    αΠζɾɾ
    ஋ɾɾɾɾIUUQFYBNQMF

    View full-size slide

  48. γϦΞϥΠζ
    ͜ͷ৘ใΛςΩετͰม׵ͯ͠͠·͏ͱ
    ܕɾɾɾɾ4USJOHܕ
    αΠζɾɾ
    ஋ɾɾɾɾIUUQMPDBMIPTU
    ܕɾɾɾɾ4USJOHܕ
    αΠζɾɾ
    ஋ɾɾɾɾIUUQFYBNQMF
    จࣈ

    View full-size slide

  49. γϦΞϥΠζ
    ͜ͷ৘ใΛςΩετͰม׵ͯ͠͠·͏ͱ
    ܕɾɾɾɾ4USJOHܕ
    αΠζɾɾ
    ஋ɾɾɾɾIUUQMPDBMIPTU
    ܕɾɾɾɾ4USJOHܕ
    αΠζɾɾ
    ஋ɾɾɾɾIUUQFYBNQMF
    จࣈ
    ࠩҟ͕ग़Δ

    View full-size slide

  50. γϦΞϥΠζ
    Կ͕ى͜Δͷ͔ʁ
    γϦΞϥΠζͨ͠σʔλΛॲཧ͢Δ৔߹ʹ
    ಈ࡞͠ͳ͍ϓϥάΠϯͳͲ͕ग़͖ͯ·͢ɻ

    View full-size slide

  51. )JOU
    &SSPS5IJTEPFTOPUTFFNUPCFB8PSE1SFTTJOTUBMMBUJPO
    ͜ͷΤϥʔ͕ग़ͨΒ8PSE1SFTT͕Πϯε
    τʔϧ͞Ε͍ͯΔύεΛΦϓγϣϯΛ࢖ͬ
    ͯ఻͍͑ͯͩ͘͞
    QBUIBQQQVCMJD

    View full-size slide

  52. ΋ͬͱ͍Ζ͍Ζ͋Γ·͢
    ৄ͘͠͸υΩϡϝϯτΛͲ͏ͧ
    IUUQTEFWFMPQFSXPSEQSFTTPSHDMJDPNNBOET

    View full-size slide

  53. 8PSE1SFTTΛ
    ͲΜͲΜָʹ؅ཧ͠·͠ΐ͏

    View full-size slide

  54. 8PSE1SFTTΛ
    ͲΜͲΜָʹ؅ཧ͠·͠ΐ͏

    View full-size slide

  55. 8PSE1SFTTΛ
    ͲΜͲΜָʹ؅ཧ͠·͠ΐ͏
    8ͱ1͸େจࣈ

    View full-size slide

  56. ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠

    View full-size slide