Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
WordPress用ローカル環境構築ツール 「Local by Flywheel」を使ってみて
Search
kassy
February 11, 2017
Technology
0
2k
WordPress用ローカル環境構築ツール 「Local by Flywheel」を使ってみて
kassy
February 11, 2017
Tweet
Share
More Decks by kassy
See All by kassy
VR and Motion Capture
kassy000
0
43
第65回 WordBench大阪「WordPressコミュニティに3年間参加して」
kassy000
0
140
WordBench Osaka #64 テーマもくもく会
kassy000
1
120
WordPress最新事情と広がる地域コミュニティ 関西オープンフォーラム2016
kassy000
1
120
WordPress Codex 日本語版を翻訳してみよう!
kassy000
0
210
How to use the 3D Printer and create the 3D Model data for printing
kassy000
1
110
フルスクラッチのテーマで サイトを作る楽しみ
kassy000
1
8.1k
WordPress in CMS Osaka Summer Festival 2016
kassy000
3
120
A Slide of session for accessibility ready theme in WordCamp Kansai 2016
kassy000
0
71
Other Decks in Technology
See All in Technology
Amazon CloudWatch Network Monitor のススメ
yuki_ink
1
200
Amplify Gen2 Deep Dive / バックエンドの型をいかにしてフロントエンドへ伝えるか #TSKaigi #TSKaigiKansai #AWSAmplifyJP
tacck
PRO
0
370
AIチャットボット開発への生成AI活用
ryomrt
0
170
スクラム成熟度セルフチェックツールを作って得た学びとその活用法
coincheck_recruit
1
140
Incident Response Practices: Waroom's Features and Future Challenges
rrreeeyyy
0
160
いざ、BSC討伐の旅
nikinusu
2
780
[FOSS4G 2024 Japan LT] LLMを使ってGISデータ解析を自動化したい!
nssv
1
210
DMARC 対応の話 - MIXI CTO オフィスアワー #04
bbqallstars
1
160
Application Development WG Intro at AppDeveloperCon
salaboy
0
180
RubyのWebアプリケーションを50倍速くする方法 / How to Make a Ruby Web Application 50 Times Faster
hogelog
3
940
Lexical Analysis
shigashiyama
1
150
Python(PYNQ)がテーマのAMD主催のFPGAコンテストに参加してきた
iotengineer22
0
470
Featured
See All Featured
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
GitHub's CSS Performance
jonrohan
1030
460k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Optimizing for Happiness
mojombo
376
70k
What's new in Ruby 2.0
geeforr
343
31k
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
Music & Morning Musume
bryan
46
6.2k
Speed Design
sergeychernyshev
24
610
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Code Reviewing Like a Champion
maltzj
520
39k
Transcript
WordPress༻ϩʔΧϧڥߏஙπʔϧ ʮLocal by FlywheelʯΛͬͯΈͯ ୈ62ճ WordBenchେࡕ ദݪɹ߶(Χογʔ)
ࣗݾհ ദݪɹ߶ʢΧογʔʣ WebσβΠφʔʗϑϩϯτΤϯυΤϯδχΞʗ3DCGσβΠφʔ Digistry ද େֶɾઐֶߍͷߨࢣ WordBenchେࡕϞσϨʔλʔʗWordCamp Kansai2016࣮ߦҕһ WordPressςʔϚʮBG Photo
Frameʯ 3DΘʔ WordCamp Kansai2016࣮ߦҕһ
Έͳ͞ΜɺWordPressͰαΠτߏங͢Δͱ͖ʹ ϩʔΧϧڥ͍ͬͯ·͔͢ʁ
ͲΜͳϩʔΧϧڥߏஙπʔϧΛ͍ͬͯ·͔͢ʁ VCCW Wocker MAMP VVV XAMPP ͲΕศརͳͷ͔Γɻ
Local By Flywheel ͦ͜ʹ৽ͨͳπʔϧ͕ొɻ https://local.getflywheel.com/
Local by Flywheelͱ • DockerϕʔεͷWordPress༻ϩʔΧϧ։ൃڥπʔϧɻ • ݩʑPressmaticͱ͍͏໊લͰ20167݄ʹ$129ͰϦϦʔεɻ • ͦͷޙɺFlywheelͱ͍͏σβΠφʔαΠτ੍࡞ձ͚ࣾͷϗεςΟϯά ձࣾʹങऩʹങऩ͞Εɺݱࡏͷ໊લʹͳͬͯϑϦʔιϑτΣΞʹɻ
• ݱࡏMac൛ͷΈɻ
ਐߦதͷϓϩδΣΫτΛLocal by FlyWheelʹҠߦͯ͠ ͠Βͬͯ͘Έ·ͨ͠ɻ Local by FlywheelͷҠߦ http://www.u-arts.jp https://light-accessory.shop U-ARTS
Light
ࠓճMacͰͷखॱͷΈ͓͠·͢ɻ
Local by Flywheelͷಛ • GUIͰΒ͘Β͘ૢ࡞ɻ • ઃఆΛೖྗ͢Δ͚ͩͰɺWordPress͕Πϯετʔϧ͞Ε͙ͯ͢ʹ͑ΔΑ͏ʹɻ • ։ൃʹศརͳπʔϧ͕ͨ͘͞Μಉࠝɻ
Πϯετʔϧ VirtualBoxඞཁͰ͕͢ɺແ͚ΕࣗಈͰΠϯετʔϧͯ͘͠Ε·͢ɻ Let's GoʂϘλϯΛԡ͚ͩ͢ɻ
ϩʔΧϧڥΛҰׅཧ αʔόʔɺPHPͷόʔδϣϯΓସ͑ SSL SSH BluePrints ΤΫεϙʔτɺΠϯϙʔτ Xdebug Local by Flywheelͷػೳ
ෳͷϩʔΧϧڥΛಉ࣌ʹىಈɺγϟοτμϯ ApacheͱnginxΛΓସ͑ɻPHP5.6ɺ7.03ͳͲɺෳͷPHPόʔδϣϯΛΓସ͑ httpsͰͷঢ়ଶΛϓϨϏϡʔ rootΞΫηεՄ ηοτΞοϓͨ͠WordPressͷঢ়ଶΛςϯϓϨʔτԽɻαΠτͷΫϩʔϯΛ࡞ɻ σʔλϕʔε͝ͱσʔλΛzipΞʔΧΠϒԽɻΠϯϙʔτ͢Ε͙͢ʹ෮׆ɻ PHPStormͰͷσόοΫઃఆΛϘλϯͻͱͭͰɻ
WP-CLI adminer ngrok Mailcatcher WordPress༻ίϚϯυϥΠϯπʔϧ σʔλϕʔεཧπʔϧ Ұ࣌తʹϩʔΧϧڥΛ֎෦ʹެ։Ͱ͖Δπʔϧ ϝʔϧૹ৴ͷςετπʔϧ ಉࠝπʔϧ
αΠτͷϑΝΠϧߏ app public sql conf log WordPressຊମ σʔλϕʔεؔ࿈ϑΝΠϧ αʔόʔɺPHPͳͲͷઃఆϑΝΠϧ ϩάϑΝΠϧ
site ϧʔτϑΥϧμ
ؔ࿈ϑΝΠϧͷॴ ϗʔϜσΟϨΫτϦ/.docker/machine/machines/local-by-flywheel ԾϚγϯϑΝΠϧ ઃఆϑΝΠϧ ϗʔϜσΟϨΫτϦ/Library/Application Support/Local by Flywheel ԾϚγϯ͕ىಈ͠ͳ͘ͳΔ͜ͱ͕Կճ͕ى͜Γ·ͨ͠ɻ όοΫΞοϓ͍ͯͨؔ͠࿈ϑΝΠϧΛ্ॻ͖ίϐʔͨ͠ΒىಈͰ͖ΔΑ͏ʹɻ
※.dockerͱLibraryӅ͠ϑΥϧμʹͳ͍ͬͯ·͢ɻ Ӆ͠ϑΥϧμΛදࣔͤ͞ΔΞϓϦΛ͏͔ɺλʔϛφϧͰҎԼͷίϚϯυΛଧͭͱදࣔͰ͖·͢ɻ defaults write com.apple.finder AppleShowAllFiles TRUE killall Finder όοΫΞοϓ͜·Ίʹ…
ଞͷϩʔΧϧڥ͔ΒͷҠߦ
• wp-contentϑΥϧμ • σʔλϕʔε(WP-CLIɺphpMyAdminͳͲͰ.sqlϑΝΠϧΛΤΫεϙʔτ) Local by FlywheelͰ࡞ͨ͠αΠτʹΠϯϙʔτ ଞͷϩʔΧϧڥ͔ΒσʔλΛΤΫεϙʔτ σʔλͷҠߦ •
wp-contentϑΥϧμ • σʔλϕʔε(WP-CLIɺadminerͳͲͰ.sqlϑΝΠϧΛΠϯϙʔτ) σʔλϕʔεͷυϝΠϯ໊Λॻ͖͑ WP-CLIͷwp search-replaceɺDATABASE SEARCH AND REPLACE SCRIPT IN PHPͳͲΛ༻ old-site.dev → new-site.dev HOSTSϑΝΠϧΛฤू(ඞཁͳ߹ͷΈ) /private/etc/hosts Ҏલͱಉ͡υϝΠϯ໊Λ༻͢Δ߹چϩʔΧϧڥͷهड़෦Λআ
ͬͱշదʹ͏ͨΊʹ
σϓϩΠπʔϧͷಋೖ ͜Ε͚ͩͷػೳ͕ἧ͍ͬͯ·͕͢ɺݱࡏͷόʔδϣϯ(1.4.2)Ͱɺ WordMoveͳͲͷσϓϩΠπʔϧಉࠝ͞Ε͍ͯ·ͤΜɻ ͜ͷ··ͩͱϦϞʔταʔόʔͱͷಉظ͕গ͠໘Ͱ͢ɻ ͦ͜Ͱ…
WordMoveΛΠϯετʔϧ ϗετϚγϯʹWordMoveΛΠϯετʔϧ͢Δ͜ͱͰ σϓϩΠ͕؆୯ʹग़དྷΔΑ͏ʹͳΓ·͢ɻ λʔϛφϧͰΠϯετʔϧ gem install wordmove
Movefileͷ࡞ WordPressຊମԼʹςΩετΤσΟοτͳͲͰ ʮMovefileʯͱ͍͏໊শͰςΩετϑΝΠϧΛ࡞
https://github.com/welaika/wordmove Movefileͷฤू local: vhost: "http://wordpress.dev" wordpress_path: "~/Local Sites/ wordpress database:
name: "local" user: "root" password: "root" ཧը໘ͰDBͷใΛࢀরɻϙʔτهड़͢Δɻ ϦϞʔταʔόʔͷใهड़͢Δɻ αϯϓϧΛݩʹlocalͷMovefileͷ֤߲Λهड़ɻ
WordMoveͷ࣮ߦ ϦϞʔτ͔ΒσʔλϕʔεɺίϯςϯπΛऔಘ wordmove pull -d -u ϩʔΧϧ͔Β͔ΒςʔϚΛΞοϓϩʔυ wordmove push -t
WordPressຊମͷσΟϨΫτϦʹҠಈ WordMoveίϚϯυ cd /Users/Ϣʔβʔ໊/Local\ Sites/αΠτͷϧʔτσΟϨΫτϦ/app/public
όονϑΝΠϧͰWordMoveͷ࣮ߦ ϑΝΠϧͷμϒϧΫϦοΫͰσϓϩΠ ςΩετΤσΟοτͳͲͰɺϑΝΠϧ໊.command ͱ͍͏ϑΝΠϧΛ࡞ อଘޙɺλʔϛφϧͰ࣮ߦݖݶΛՃ chmod u+x ϑΝΠϧ໊.command ίϚϯυΛهड़ ςʔϚͷpush
DBɺϝσΟΞͷpull ϑΝΠϧͷμϒϧΫϦοΫͰ࣮ߦ cd [αΠτύε]/app/public/ wordmove push -t cd [αΠτύε]/app/public/ wordmove pull -d -u
ͦͷଞ
΄͔ͷCMSͷΠϯετʔϧɺಈ࡞ɺཧ 1. publicϑΥϧμͷWordPressͷຊମϑΝΠϧΛআɻ 2. Πϯετʔϧ͍ͨ͠CMSͷຊମϑΝΠϧΛpublicϑΥϧμʹίϐʔɻ 3. σʔλϕʔεͷશςʔϒϧΛআɻ 4. ֤CMSͷํ๏ʹैͬͯΠϯετʔϧɻ EC-CUBE
EC-CUBEconcrete5͕ΠϯετʔϧͰ͖Δ͜ͱΛ֬ೝɻ concrete5
ࠓޙͷ։ൃ༧ఆ • Windows൛ϦϦʔε༧ఆ • σϓϩΠπʔϧ(FlywheelαʔόʔͷΈରԠ?) • ϦϞʔταΠτΛΠϯϙʔτ • ϓϨϛΞϜαϙʔτ •
Pro൛։ൃத
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ɻ շదͳϩʔΧϧڥΛ࡞Δʹྑ͍αΠτΛ࡞Δ͜ͱͰ͢ɻ