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

WordPressで困った時に やるべきことと、 困らないために備えること / wb-naga...

WordPressで困った時に やるべきことと、 困らないために備えること / wb-nagano-201801

WordBench Nagano 2018 specialのスライドです

Hidetaka Okamoto

February 03, 2018
Tweet

More Decks by Hidetaka Okamoto

Other Decks in Technology

Transcript

  1. Wo rd P re s s Ͱ ࠔ ͬ ͨ

    ࣌ ʹ ΍ Δ ΂ ͖ ͜ ͱ ͱ ɺ ࠔ Β ͳ ͍ ͨ Ί ʹ උ ͑Δ ͜ ͱ Wo rd B e n c h N a g a n o S p e c i a l 2 0 1 8 ! ! !
  2. H i d e t a k a O k

    a m o t o • Digitalcube Co. Ltd. • αϙʔτϑΥʔϥϜੈ࿩໾ • WordBenchͷதͷਓ • ͜Θ͘ͳ͍
  3. A M I M O T O h t t

    p s : / / j a . a m i m o t o - a m i . c o m /
  4. $ 5 / S i t e ͷ ੩ త

    αΠ τ ϗ ε ςΟ ϯ ά h t t p s : / / g e t s h i f t e r. i o /
  5. ࠓ ೔ ͷ ࿩ ʹ ग़ ͳ ͍ ͜ ͱ

    • ؔ਺ͷॻ͖ํ • ςʔϚɾϓϥάΠϯͷ࡞Γํ • ઈରτϥϒϧΛى͜͞ͳ͍ํ๏
  6. ߄ ͯ ͯ ಈ ͘ ͱ ϩ Ϋ ͳ ͜

    ͱ ʹ ͳ Β ͳ ͍ • ߄ͯͯίʔυΛݟฦͯ͠΋ɺϛε͸ݟ͔ͭΒͳ͍ • ߄ͯͯॻ͍ͨίʔυ͸େମόάΔ • τϥϒͬͨ࣌ͦ͜ฏৗ৺
  7. τ ϥ ϒ ͬ ͨ ࣌ ͷ ର Ԡ •

    ߄ͯͳ͍ • ຊ൪؀ڥ͸·ͣόοΫΞοϓͰ෮ݩ͢Δ • ։ൃ؀ڥͰόάΛ࠶ݱͤ͞Δ • όάΛमਖ਼͢Δ • σϓϩΠ͢Δ
  8. ͳ ͥ ։ ൃ ؀ ڥ ͕ ඞ ཁ ͔

    • Ϳ͚ͬͭຊ൪Ͱ෣୆ཱͪ·͔͢ʁ • ͪΌΜͱಈ͔͘Λςετ͔ͯ͠Βຊ൪΁ • ؀ڥΛ؆୯ʹ༻ҙ͢Δํ๏͸͋Δ • ։ൃ؀ڥ͸ʮյͨ͢Ίͷ΋ͷʯ https://wckr.github.io/ http://vccw.cc/ https://local.getflywheel.com/
  9. ศ ར ͳ ։ ൃ ؀ ڥ ߏ ங α

    ʔ Ϗ ε • Local by Flywheel • Worker • VCCW • MAMP / XAMPP https://wckr.github.io/ http://vccw.cc/ https://local.getflywheel.com/
  10. τ ϥ ϒ ͬ ͨ ࣌ ͷ ର Ԡ •

    ߄ͯͳ͍ • ຊ൪؀ڥ͸·ͣόοΫΞοϓͰ෮ݩ͢Δ • ։ൃ؀ڥͰόάΛ࠶ݱͤ͞Δ • όάΛमਖ਼͢Δ • σϓϩΠ͢Δ
  11. τ ϥ ϒ ͬ ͨ ࣌ ͷ ର Ԡ •

    ߄ͯͳ͍ • ຊ൪؀ڥ͸·ͣόοΫΞοϓͰ෮ݩ͢Δ • ։ൃ؀ڥͰόάΛ࠶ݱͤ͞Δ • όάΛमਖ਼͢Δ • σϓϩΠ͢Δ
  12. ό ο Ϋ Ξ ο ϓ ͸ ෮ ݩ Ͱ

    ͖ ͳ ͍ ͱ ҙ ຯ ͕ ͳ ͍ • ։ൃ؀ڥ΍ઐ༻؀ڥͰ෮ݩखॱΛ֬ೝ͠Α͏ • ඞཁͳσʔλ͕όοΫΞοϓͰ͖͍ͯΔ͔֬ೝ͍ͯ͠Δʁ • Ϋϥ΢υαʔόʔͰ͋Ε͹ɺαʔόʔ͝ͱόοΫΞοϓͱ͍͏ख΋
  13. τ ϥ ϒ ͬ ͨ ࣌ ͷ ର Ԡ •

    ߄ͯͳ͍ • ຊ൪؀ڥ͸·ͣόοΫΞοϓͰ෮ݩ͢Δ • ։ൃ؀ڥͰόάΛ࠶ݱͤ͞Δ • όάΛमਖ਼͢Δ • σϓϩΠ͢Δ
  14. ࠶ ݱ ੑ Λ ඞ ͣͱ Ζ ͏ • ຊ౰ʹόάͳͷ͔ʁ

    • ͨ·ͨ·ωοτϫʔΫ౳ʹ໰୊͕ى͖͍͚͔ͯͨͩ΋ • ΫϥΠΞϯτ͔Βདྷͨ৔߹͸ɺ࠶ݱखॱΛ΋Β͓͏ • τϥοΩϯάπʔϧͰ؂ࢹ͢Δͱ͍͏ํ๏΋
  15. L o g R o c k e t :

    τ ϥ ο Ω ϯ ά α ʔ Ϗ ε h t t p s : / / l o g ro c k e t . c o m /
  16. 1 , 0 0 0 η ο γ ϣ ϯ

    · Ͱ ແ ྉ h t t p s : / / l o g ro c k e t . c o m /
  17. τ ϥ ϒ ͬ ͨ ࣌ ͷ ର Ԡ •

    ߄ͯͳ͍ • ຊ൪؀ڥ͸·ͣόοΫΞοϓͰ෮ݩ͢Δ • ։ൃ؀ڥͰόάΛ࠶ݱͤ͞Δ • όάΛमਖ਼͢Δ • σϓϩΠ͢Δ
  18. Τ ϥ ʔ ϩ ά ͸ ͪ Ό Μ ͱ

    ಡ ΋ ͏ • ʮӳޠ͔ͩΒɾɾɾʯͱܟԕͯ͠·ͤΜ͔ʁ • ΤϥʔϝοηʔδʹʮͲ͜ͰɺԿ͕ى͖͍ͯΔ͔ʯ͕͋Δ • Warning / Notice΋ະདྷͷόάʹͭͳ͕Δ͔Βແࢹ͠ͳ͍
  19. P a r s e e r ro r :

    s y n t a x e r ro r, u n e x p e c t e d ' } ' i n / v a r / w w w / w o rd p re s s / w p - c o n t e n t / p l u g i n s / h e l l o / i n d e x . p h p o n l i n e 2 1 ͞ ͬ ͖ ͷ Τϥ ʔ શ จ
  20. P a r s e e r ro r :

    s y n t a x e r ro r, u n e x p e c t e d ' } ' i n / v a r / w w w / w o rd p re s s / w p - c o n t e n t / p l u g i n s / h e l l o / i n d e x . p h p o n l i n e 2 1 ͞ ͬ ͖ ͷ Τϥ ʔ શ จ P a r s e e r ro r : s y n t a x e r ro r ɹ ɹ ɹ → ߏ จ Τϥ ʔ ʢ ί ʔ υ ͕ ͓ ͔ ͠ ͍ ʣ / v a r / … / p l u g i n s / h e l l o / i n d e x . p h p → ϑ ΝΠϧ ໊ o n l i n e 2 1 ɹ ɹ ɹ ɹ ɹ ɹ ɹ ɹ ɹ ɹ ɹ → ߦ ਺
  21. α ʔ όʔ ಺ ʹ Τ ϥ ʔ ϩ ά

    ͕ ͋ Δ • ϨϯλϧαʔόʔձࣾʹΑͬͯอଘ৔ॴ͕͕ͪ͏ • ϩά͕ؾʹͳΔํ͸ɺFAQ΍αϙʔτϖʔδ΁ߦͬͯΈΑ͏ • ϩάΛಡΉ͜ͱʹ఍߅ͳ͘ͳͬͨΒόά΁ͷා͕͍ͩ͞ͿݮΔ
  22. τ ϥ ϒ ͬ ͨ ࣌ ͷ ର Ԡ •

    ߄ͯͳ͍ • ຊ൪؀ڥ͸·ͣόοΫΞοϓͰ෮ݩ͢Δ • ։ൃ؀ڥͰόάΛ࠶ݱͤ͞Δ • όάΛमਖ਼͢Δ • σϓϩΠ͢Δ
  23. D e b u g B a r - Ϋ

    Τ Ϧ ৘ ใ ͳ Ͳ Λ σό ο ά h t t p s : / / j a . w o rd p re s s . o rg / p l u g i n s / d e b u g - b a r /
  24. H e a l t h C h e c

    k - σό ο ά ৘ ใ Λ ΤΫ ε ϙʔ τ h t t p s : / / j a . w o rd p re s s . o rg / p l u g i n s / h e a l t h - c h e c k /
  25. T h e m e C h e c k

    - ς ʔϚ ͷ ί ʔ υ Λ Ϩ Ϗ ϡ ʔ h t t p s : / / j a . w o rd p re s s . o rg / p l u g i n s / t h e m e - c h e c k /
  26. S h o w C u r re n t

    Te m p l a t e - ࠓ ͍ Δ ϖʔ δ ʹ ࢖ Θ Εͯ ͍ Δ ς ϯ ϓ Ϩ ʔ τϑ ΝΠϧ Λ ද ࣔ h t t p s : / / j a . w o rd p re s s . o rg / p l u g i n s / s h o w - c u r re n t - t e m p l a t e /
  27. W P - C L I ͸ Ϛδ Ͱ ศ

    ར h t t p : / / w p - c l i . o rg / j a /
  28. ӡ ༻ α ϙ ʔ τ Ͱ ศ ར ͳ

    ί Ϛ ϯ υ # Ϣʔ βʔ Λ ࡞ ੒ $ w p u s e r c re a t e a d m i n a d m i n @ e x a m p l e . c o m — ro l e = a d m i n i s t r a t o r # ύ εϫ ʔ υ Λ ม ߋ $ w p u s e r u p d a t e { u s e r _ i d } - - u s e r _ p a s s = m a r y p a s s # ϓ ϥ άΠ ϯ ͷ όʔ δ ϣ ϯ Λ μ ΢ ϯ ά Ϩ ʔ υ $ w p p l u g i n u p d a t e a k i s m e t — v e r s i o n = 3 . 1 . 3
  29. w p d o c t o r - શ

    ൠ త ͳ ໰ ୊ ͷ ν Σ ο Ϋ $ w p d o c t o r c h e c k - - a l l — s p o t l i g h t R u n n i n g c h e c k s 1 0 0 % [ = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = ] 0 : 0 3 / 0 : 0 3 + - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + | n a m e | s t a t u s | m e s s a g e | + - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + | p l u g i n - u p d a t e | w a r n i n g | 1 2 p l u g i n s h a v e u p d a t e s a v a i l a b l e . | | t h e m e - u p d a t e | w a r n i n g | 3 t h e m e s h a v e u p d a t e s a v a i l a b l e . | | l a n g u a g e - u p d a t e | w a r n i n g | 1 l a n g u a g e h a s a n u p d a t e a v a i l a b l e . | + - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
  30. w p p ro f i l e - ύ

    ϑ Υ ʔ Ϛ ϯε ͷ ϓ ϩ ϑ Ν Π Ϧ ϯ ά $ w p p ro f i l e s t a g e - - f i e l d s = s t a g e , t i m e , c a c h e _ r a t i o + - - - - - - - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - - - - - - - + | s t a g e | t i m e | c a c h e _ r a t i o | + - - - - - - - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - - - - - - - + | b o o t s t r a p | 1 . 2 7 3 3 s | 9 5 . 4 9 % | | m a i n _ q u e r y | 0 . 0 0 5 6 s | 8 7 . 8 % | | t e m p l a t e | 0 . 1 4 4 8 s | 9 7 . 2 9 % | + - - - - - - - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - - - - - - - + | t o t a l ( 3 ) | 1 . 4 2 3 7 s | 9 3 . 5 3 % | + - - - - - - - - - - - - - - + - - - - - - - - - - - + - - - - - - - - - - - - - - - +
  31. ೲ ඼ ͠ ͨ ϓ ϥ άΠ ϯ ɾ ς

    ʔ Ϛ ʹ Τ ϥ ʔ τ ϥ ο Χ ʔ • ӡ༻࣌ʹͳͬͯݦࡏԽ͢Δόά΋͋Δ • ͦΜͳόάʹͳΔ΂͘ૣ͘ؾ͖͍ͮͨ • ΤϥʔΛ௨஌͢ΔαʔϏεΛ૊ΈࠐΉͱ͍͏ํ๏ • Rollbar / Faultline / aribrake.io / etc…
  32. F a u l t l i n e :

    A W S ϕʔε ͷ O S S Τϥ ʔ τ ϥ ο Ω ϯ ά π ʔϧ h t t p s : / / s p e a k e rd e c k . c o m / k 1 l o w / p h p - c o n f e re n c e - f u k u o k a - 2 0 1 7
  33. ೔ ຊ ޠ α ϙʔ τϑ Υ ʔ ϥϜ h

    t t p s : / / j a . w o rd p re s s . o rg / s u p p o r t /
  34. ໰ ୊ ղ ܾ ͷ ͨ Ί ͷ ν Σ

    ο Ϋ Ϧε τ h t t p : / / b i t . l y / 2 r S S n C C
  35. ͔ ͳ Γ ΞΫ ςΟ ϒ ͳ ϑ Υ ʔ

    ϥϜ h t t p s : / / j a . w o rd p re s s . o rg / s u p p o r t /
  36. ϑ Υ ʔ ϥϜ Λ ༗ ޮ ׆ ༻ •

    ʮ໰୊ղܾͷͨΊͷνΣοΫϦετʯΛ·ͣಡ΋͏ • աڈͷ౤ߘΛݕࡧͯ͠ɺྨࣅέʔε͕ͳ͍͔ௐ΂Α͏ • Health CheckϓϥάΠϯͷग़͓ͯ͘͠ͱΑΓαϙʔτ͞Ε΍͍͢ • ฦ৴͕͜ͳͯ͘΋ౖΒͳ͍
  37. ࠷ ௿ ݶ ͷ ྱ ّ ͸ ΋ ͪ ·

    ͠ ΐ ͏ • ฦ৴͕ͳ͍ɿϨΞέʔεͰΘ͔Δਓ͕͍ͳ͍ or ࣭໰͕Α͘Θ͔Βͳ͍ • B: ҎԼͷΑ͏ͳ౤ߘ͸ൃݟޙ௚ͪʹ࡟আ͞Ε·͢ɻ • ຊจͷͳ͍τϐοΫ΍ฦ৴ɻ • εύϜ΍SEO໨తͰͷ౤ߘΛͨ͠Ϣʔβʔ͸ϒϩοΫ͞ΕɺURL͸ฤू͞Ε·͢ɻ • τϐοΫ࡞੒ऀ΍ଞͷಡऀʹ༗ҙٛͳ৘ใΛఏڙͤͣɺඇݐஙతͳൃݴʢଞͷϢʔ βʔΛݟԼ͢ɺѱؾͷ͋Δൽ೑Λݴ͏ͳͲʣͷΈͷ౤ߘ͸࡟আ͞ΕΔ͜ͱ͕͋Γ· ͢ɻ http://bit.ly/2nsFLg6
  38. ༗ ྉ ς ʔ Ϛ ͷ p ro s /

    c o n s • ༗ྉςʔϚ͸ػೳ΍σβΠϯ͕ັྗత • ͨͩ͠ങͬͨਓ͔͠ίʔυΛݟΔ͜ͱ͕Ͱ͖ͳ͍ • αϙʔτϑΥʔϥϜͰ͸༗ྉςʔϚ͸αϙʔτͰ͖ͳ͍ • τϥϒͬͨ࣌ʹॿ͚ͯ͘ΕΔ૭ޱ͸͋Γ·͔͢ʁ • αϙʔτ͕ӳޠͷΈͷέʔε΋͋Δ
  39. ͳ ͥ ί ϛ ϡ χ ς Ο ʹ ࢀ

    Ճ ͢ Δ ͱ ࠔ Β ͳ ͍ ͷ ʁ • ࣮ࡍʹWPͰ࢓ࣄ͍ͯ͠Δਓͨͪͱ࿩ͤΔ • ࠷ۙͷಈ޲΍τϥϒͬͨ࿩ͳͲ͕ฉ͚Δ • ศརͳπʔϧ΍ϓϥάΠϯͳͲ͕஌ΕΔ • දʹग़ͤͳ͍࿩΍৘ใ͕खʹೖΔ͜ͱ΋͋Δ • ϦΞϧͳ৘ใ͕͋ΔͱɺઌճΓ΍༧๷ࡦ͕ͱΓ΍͍͢
  40. ྫ ͑ ͹ ͜ ͏ ͍ ͏ ࿩ ஌ ͬͯ

    · ͢ ͔ ʁ • WordPressͷਪ঑ར༻؀ڥ • PHPɹ • MySQLɹ • ɹ
  41. ྫ ͑ ͹ ͜ ͏ ͍ ͏ ࿩ ஌ ͬͯ

    · ͢ ͔ ʁ • WordPressͷਪ঑ར༻؀ڥ • PHPɹ : 7.2 or greater • MySQL: 5.6 or greater or MariaDB 10.0 or greater • HTTPS support https://wordpress.org/about/requirements/
  42. ଞ ʹ ΋ ͍ Ζ ͍ Ζ ͋ Δ ͷ

    Ͱɺ ஌ Γ ͨ ͍ ਓ ͸ ࠙ ਌ ձ ΁
  43. Ұ ൪ ޮ ཰ త ʹ ৘ ใ Λ ख

    ʹ ೖ Ε Δ ํ ๏ ɹ ˠ લ Ͱ ࿩ ͢
  44. લ Ͱ ࿩ ͢ ͜ ͱ ͕ Ұ ൪ ษ

    ڧ ʹ ͳ Δ • ొஃͷͨΊͷԼௐ΂Ͱษڧ͢Δ • ొஃ࣌ͷ࣭ٙԠ౴Ͱ৽͍͠ؾ͖͕ͮखʹ͸͍Δ • ొஃऀಉ࢜ͷࡶஊͰ͍ΖΜͳ࿩͕ฉ͚Δ • ొஃऀ͸਺ਓɺࢀՃऀ͸͍ͬͺ͍
  45. G e t I n v o l v e

    d w i t h Wo rd P re s s h t t p s : / / m a k e . w o rd p re s s . o rg /
  46. G e t I n v o l v e

    d w i t h Wo rd P re s s • ࢀՃʹ͍͢͜͝ͱΛ͢Δ͜ͱͰ͸ͳ͍ • WPΛ࢖͍ͬͯΔͱݴ͏͜ͱ • ʮ͜͜Ͱࠔ͚ͬͯͨͲɺ͜͏ղܾͨ͠ʯͱϊ΢ϋ΢Λڞ༗͢Δ͜ͱ • ʮৄࡉ΋͏ͪΐͬͱڭ͑ͯʯͱ࣭໰ΛҾ͖ग़͢͜ͱ • ࣗ෼ͷ΍Γ͍ͨൣғͰࢀՃ͠Α͏
  47. – J a m e s D a n f

    o r t h " D a n " Q u a y l e “The future will be better tomorrow.”